Author: dkulp
Date: Tue Feb 14 18:23:02 2012
New Revision: 1244145
URL: http://svn.apache.org/viewvc?rev=1244145&view=rev
Log:
The serversocket lock doesn't seem to be 100% reliable. Stick with a
randomo starting point
Modified:
cxf/trunk/parent/pom.xml
cxf/trunk/testutils/src/main/java/org/apache/cxf/testutil/common/TestUtil.java
Modified: cxf/trunk/parent/pom.xml
URL:
http://svn.apache.org/viewvc/cxf/trunk/parent/pom.xml?rev=1244145&r1=1244144&r2=1244145&view=diff
==============================================================================
--- cxf/trunk/parent/pom.xml (original)
+++ cxf/trunk/parent/pom.xml Tue Feb 14 18:23:02 2012
@@ -370,6 +370,7 @@
<argLine>${cxf.surefire.fork.vmargs}</argLine>
<parallel>${cxf.surefire.parallel.mode}</parallel>
<systemPropertyVariables>
+
<cxf.useRandomFirstPort>true</cxf.useRandomFirstPort>
<org.apache.ws.commons.schema.protectReadOnlyCollections>${cxf.protect-xmlschema-collections}</org.apache.ws.commons.schema.protectReadOnlyCollections>
<cxf.validateServiceSchemas>${cxf.validateServices}</cxf.validateServiceSchemas>
<java.awt.headless>${java.awt.headless}</java.awt.headless>
Modified:
cxf/trunk/testutils/src/main/java/org/apache/cxf/testutil/common/TestUtil.java
URL:
http://svn.apache.org/viewvc/cxf/trunk/testutils/src/main/java/org/apache/cxf/testutil/common/TestUtil.java?rev=1244145&r1=1244144&r2=1244145&view=diff
==============================================================================
---
cxf/trunk/testutils/src/main/java/org/apache/cxf/testutil/common/TestUtil.java
(original)
+++
cxf/trunk/testutils/src/main/java/org/apache/cxf/testutil/common/TestUtil.java
Tue Feb 14 18:23:02 2012
@@ -27,6 +27,7 @@ import java.net.URISyntaxException;
import java.net.URL;
import java.net.URLClassLoader;
import java.util.Properties;
+import java.util.Random;
public final class TestUtil {
@@ -38,6 +39,9 @@ public final class TestUtil {
static {
int pn = 9000;
+ if (Boolean.getBoolean("cxf.useRandomFirstPort")) {
+ pn += new Random().nextInt(500) * 100;
+ }
while (portNum == -1) {
try {
//we'll hold a socket open and allocate ports up from that
socket.