Author: dkulp
Date: Fri Jun 11 18:43:11 2010
New Revision: 953823
URL: http://svn.apache.org/viewvc?rev=953823&view=rev
Log:
Merged revisions 952734 via svnmerge from
https://svn.apache.org/repos/asf/cxf/trunk
........
r952734 | dkulp | 2010-06-08 12:57:46 -0400 (Tue, 08 Jun 2010) | 3 lines
Only use full dynamic ports within maven. In Eclipse or other,
just start at 9000 and count up ot make it easier in wireshark
and such to find the data.
........
Modified:
cxf/branches/2.2.x-fixes/ (props changed)
cxf/branches/2.2.x-fixes/parent/pom.xml
cxf/branches/2.2.x-fixes/testutils/src/main/java/org/apache/cxf/testutil/common/TestUtil.java
Propchange: cxf/branches/2.2.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.
Modified: cxf/branches/2.2.x-fixes/parent/pom.xml
URL:
http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/parent/pom.xml?rev=953823&r1=953822&r2=953823&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/parent/pom.xml (original)
+++ cxf/branches/2.2.x-fixes/parent/pom.xml Fri Jun 11 18:43:11 2010
@@ -247,6 +247,7 @@
<argLine>${surefire.fork.vmargs}</argLine>
<parallel>${surefire.parallel.mode}</parallel>
<systemPropertyVariables>
+ <useRandomPorts>true</useRandomPorts>
<cxf.validateServiceSchemas>${cxf.validateServices}</cxf.validateServiceSchemas>
<java.awt.headless>${java.awt.headless}</java.awt.headless>
<java.util.logging.config.file>${basedir}/target/test-classes/logging.properties</java.util.logging.config.file>
Modified:
cxf/branches/2.2.x-fixes/testutils/src/main/java/org/apache/cxf/testutil/common/TestUtil.java
URL:
http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/testutils/src/main/java/org/apache/cxf/testutil/common/TestUtil.java?rev=953823&r1=953822&r2=953823&view=diff
==============================================================================
---
cxf/branches/2.2.x-fixes/testutils/src/main/java/org/apache/cxf/testutil/common/TestUtil.java
(original)
+++
cxf/branches/2.2.x-fixes/testutils/src/main/java/org/apache/cxf/testutil/common/TestUtil.java
Fri Jun 11 18:43:11 2010
@@ -30,7 +30,9 @@ import java.util.Properties;
public final class TestUtil {
- static Properties ports = new Properties();
+ private static boolean useRandomPorts =
Boolean.getBoolean("useRandomPorts");
+ private static int portNum = 9000;
+ private static Properties ports = new Properties();
private TestUtil() {
//Complete
@@ -96,15 +98,19 @@ public final class TestUtil {
}
}
if (p == null) {
- try {
- ServerSocket sock = new ServerSocket(0);
- p = Integer.toString(sock.getLocalPort());
- ports.put("testutil.ports." + name, p);
- System.setProperty("testutil.ports." + name, p);
- sock.close();
- } catch (IOException ex) {
- //
+ if (useRandomPorts) {
+ try {
+ ServerSocket sock = new ServerSocket(0);
+ p = Integer.toString(sock.getLocalPort());
+ sock.close();
+ } catch (IOException ex) {
+ //
+ }
+ } else {
+ p = Integer.toString(portNum++);
}
+ ports.put("testutil.ports." + name, p);
+ System.setProperty("testutil.ports." + name, p);
}
return p;
}