You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2012/01/18 08:04:09 UTC
svn commit: r1232763 - in /camel/trunk/examples:
camel-example-cxf-blueprint/src/test/java/org/apache/camel/example/reportincident/
camel-example-cxf-osgi/src/test/java/org/apache/camel/example/reportincident/
camel-example-cxf-proxy/src/test/java/org/...
Author: davsclaus
Date: Wed Jan 18 07:04:09 2012
New Revision: 1232763
URL: http://svn.apache.org/viewvc?rev=1232763&view=rev
Log:
CAMEL-4814 Use dynamic port numbers for testing examples.
Modified:
camel/trunk/examples/camel-example-cxf-blueprint/src/test/java/org/apache/camel/example/reportincident/ReportIncidentRoutesClientTest.java
camel/trunk/examples/camel-example-cxf-osgi/src/test/java/org/apache/camel/example/reportincident/ReportIncidentRoutesClientTest.java
camel/trunk/examples/camel-example-cxf-proxy/src/test/java/org/apache/camel/example/reportincident/ReportIncidentRoutesTest.java
camel/trunk/examples/camel-example-loan-broker/src/test/java/org/apache/camel/loanbroker/webservice/version/LoanBrokerWSTest.java
camel/trunk/examples/camel-example-osgi-rmi/src/test/java/org/apache/camel/example/osgi/RmiTest.java
camel/trunk/examples/camel-example-reportincident-wssecurity/src/test/java/org/apache/camel/example/reportincident/ReportIncidentRoutesTest.java
camel/trunk/examples/camel-example-reportincident/src/test/java/org/apache/camel/example/reportincident/ReportIncidentRoutesTest.java
camel/trunk/examples/camel-example-spring-jms/src/test/java/org/apache/camel/example/SpringJmsClientRemotingServerTest.java
camel/trunk/examples/camel-example-spring-jms/src/test/java/org/apache/camel/example/SpringJmsClientServerTest.java
Modified: camel/trunk/examples/camel-example-cxf-blueprint/src/test/java/org/apache/camel/example/reportincident/ReportIncidentRoutesClientTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/examples/camel-example-cxf-blueprint/src/test/java/org/apache/camel/example/reportincident/ReportIncidentRoutesClientTest.java?rev=1232763&r1=1232762&r2=1232763&view=diff
==============================================================================
--- camel/trunk/examples/camel-example-cxf-blueprint/src/test/java/org/apache/camel/example/reportincident/ReportIncidentRoutesClientTest.java (original)
+++ camel/trunk/examples/camel-example-cxf-blueprint/src/test/java/org/apache/camel/example/reportincident/ReportIncidentRoutesClientTest.java Wed Jan 18 07:04:09 2012
@@ -37,9 +37,9 @@ public class ReportIncidentRoutesClientT
@BeforeClass
public static void setupFreePort() throws Exception {
- // find a free port number from 9100 onwards, and write that in the custom.properties file
+ // find a free port number, and write that in the custom.properties file
// which we will use for the unit tests, to avoid port number in use problems
- int port = AvailablePortFinder.getNextAvailable(9100);
+ int port = AvailablePortFinder.getNextAvailable();
String s = "port=" + port;
File custom = new File("target/custom.properties");
FileOutputStream fos = new FileOutputStream(custom);
Modified: camel/trunk/examples/camel-example-cxf-osgi/src/test/java/org/apache/camel/example/reportincident/ReportIncidentRoutesClientTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/examples/camel-example-cxf-osgi/src/test/java/org/apache/camel/example/reportincident/ReportIncidentRoutesClientTest.java?rev=1232763&r1=1232762&r2=1232763&view=diff
==============================================================================
--- camel/trunk/examples/camel-example-cxf-osgi/src/test/java/org/apache/camel/example/reportincident/ReportIncidentRoutesClientTest.java (original)
+++ camel/trunk/examples/camel-example-cxf-osgi/src/test/java/org/apache/camel/example/reportincident/ReportIncidentRoutesClientTest.java Wed Jan 18 07:04:09 2012
@@ -32,7 +32,7 @@ public class ReportIncidentRoutesClientT
// should be the same address as we have in our route
private static final String URL = "http://localhost:%s/cxf/camel-example-cxf-osgi/webservices/incident";
- private static final int PORT = AvailablePortFinder.getNextAvailable(9100);
+ private static final int PORT = AvailablePortFinder.getNextAvailable();
@BeforeClass
public static void setUpBeforeClass() {
Modified: camel/trunk/examples/camel-example-cxf-proxy/src/test/java/org/apache/camel/example/reportincident/ReportIncidentRoutesTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/examples/camel-example-cxf-proxy/src/test/java/org/apache/camel/example/reportincident/ReportIncidentRoutesTest.java?rev=1232763&r1=1232762&r2=1232763&view=diff
==============================================================================
--- camel/trunk/examples/camel-example-cxf-proxy/src/test/java/org/apache/camel/example/reportincident/ReportIncidentRoutesTest.java (original)
+++ camel/trunk/examples/camel-example-cxf-proxy/src/test/java/org/apache/camel/example/reportincident/ReportIncidentRoutesTest.java Wed Jan 18 07:04:09 2012
@@ -40,11 +40,11 @@ public class ReportIncidentRoutesTest {
@BeforeClass
public static void setupFreePort() throws Exception {
- // find a free port number from 9100 onwards, and write that in the custom.properties file
+ // find a free port number, and write that in the custom.properties file
// which we will use for the unit tests, to avoid port number in use problems
- int port = AvailablePortFinder.getNextAvailable(9100);
+ int port = AvailablePortFinder.getNextAvailable();
String s = "proxy.port=" + port;
- int port2 = AvailablePortFinder.getNextAvailable(port + 1);
+ int port2 = AvailablePortFinder.getNextAvailable();
String s2 = "real.port=" + port2;
File custom = new File("target/custom.properties");
Modified: camel/trunk/examples/camel-example-loan-broker/src/test/java/org/apache/camel/loanbroker/webservice/version/LoanBrokerWSTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/examples/camel-example-loan-broker/src/test/java/org/apache/camel/loanbroker/webservice/version/LoanBrokerWSTest.java?rev=1232763&r1=1232762&r2=1232763&view=diff
==============================================================================
--- camel/trunk/examples/camel-example-loan-broker/src/test/java/org/apache/camel/loanbroker/webservice/version/LoanBrokerWSTest.java (original)
+++ camel/trunk/examples/camel-example-loan-broker/src/test/java/org/apache/camel/loanbroker/webservice/version/LoanBrokerWSTest.java Wed Jan 18 07:04:09 2012
@@ -32,17 +32,17 @@ public class LoanBrokerWSTest extends Ca
@BeforeClass
public static void setupFreePort() throws Exception {
- // find a free port number from 9100 onwards, and write that in the custom.properties file
+ // find a free port number, and write that in the custom.properties file
// which we will use for the unit tests, to avoid port number in use problems
- int port = AvailablePortFinder.getNextAvailable(9100);
+ int port = AvailablePortFinder.getNextAvailable();
String bank1 = "bank1.port=" + port;
- port = AvailablePortFinder.getNextAvailable(port + 1);
+ port = AvailablePortFinder.getNextAvailable();
String bank2 = "bank2.port=" + port;
- port = AvailablePortFinder.getNextAvailable(port + 1);
+ port = AvailablePortFinder.getNextAvailable();
String bank3 = "bank3.port=" + port;
- port = AvailablePortFinder.getNextAvailable(port + 1);
+ port = AvailablePortFinder.getNextAvailable();
String credit = "credit_agency.port=" + port;
- port = AvailablePortFinder.getNextAvailable(port + 1);
+ port = AvailablePortFinder.getNextAvailable();
String loan = "loan_broker.port=" + port;
File custom = new File("target/custom.properties");
Modified: camel/trunk/examples/camel-example-osgi-rmi/src/test/java/org/apache/camel/example/osgi/RmiTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/examples/camel-example-osgi-rmi/src/test/java/org/apache/camel/example/osgi/RmiTest.java?rev=1232763&r1=1232762&r2=1232763&view=diff
==============================================================================
--- camel/trunk/examples/camel-example-osgi-rmi/src/test/java/org/apache/camel/example/osgi/RmiTest.java (original)
+++ camel/trunk/examples/camel-example-osgi-rmi/src/test/java/org/apache/camel/example/osgi/RmiTest.java Wed Jan 18 07:04:09 2012
@@ -40,9 +40,9 @@ public class RmiTest extends CamelSpring
@BeforeClass
public static void setupFreePort() throws Exception {
- // find a free port number from 9100 onwards, and write that in the custom.properties file
+ // find a free port number, and write that in the custom.properties file
// which we will use for the unit tests, to avoid port number in use problems
- port = AvailablePortFinder.getNextAvailable(9100);
+ port = AvailablePortFinder.getNextAvailable();
String s = "port=" + port;
File custom = new File("target/custom.properties");
Modified: camel/trunk/examples/camel-example-reportincident-wssecurity/src/test/java/org/apache/camel/example/reportincident/ReportIncidentRoutesTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/examples/camel-example-reportincident-wssecurity/src/test/java/org/apache/camel/example/reportincident/ReportIncidentRoutesTest.java?rev=1232763&r1=1232762&r2=1232763&view=diff
==============================================================================
--- camel/trunk/examples/camel-example-reportincident-wssecurity/src/test/java/org/apache/camel/example/reportincident/ReportIncidentRoutesTest.java (original)
+++ camel/trunk/examples/camel-example-reportincident-wssecurity/src/test/java/org/apache/camel/example/reportincident/ReportIncidentRoutesTest.java Wed Jan 18 07:04:09 2012
@@ -49,9 +49,9 @@ public class ReportIncidentRoutesTest ex
@BeforeClass
public static void setupFreePort() throws Exception {
- // find a free port number from 9100 onwards, and write that in the custom.properties file
+ // find a free port number, and write that in the custom.properties file
// which we will use for the unit tests, to avoid port number in use problems
- int port = AvailablePortFinder.getNextAvailable(9100);
+ int port = AvailablePortFinder.getNextAvailable();
String s = "port=" + port;
File custom = new File("target/custom.properties");
FileOutputStream fos = new FileOutputStream(custom);
Modified: camel/trunk/examples/camel-example-reportincident/src/test/java/org/apache/camel/example/reportincident/ReportIncidentRoutesTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/examples/camel-example-reportincident/src/test/java/org/apache/camel/example/reportincident/ReportIncidentRoutesTest.java?rev=1232763&r1=1232762&r2=1232763&view=diff
==============================================================================
--- camel/trunk/examples/camel-example-reportincident/src/test/java/org/apache/camel/example/reportincident/ReportIncidentRoutesTest.java (original)
+++ camel/trunk/examples/camel-example-reportincident/src/test/java/org/apache/camel/example/reportincident/ReportIncidentRoutesTest.java Wed Jan 18 07:04:09 2012
@@ -39,9 +39,9 @@ public class ReportIncidentRoutesTest ex
@BeforeClass
public static void setupFreePort() throws Exception {
- // find a free port number from 9200 onwards, and write that in the custom.properties file
+ // find a free port number, and write that in the custom.properties file
// which we will use for the unit tests, to avoid port number in use problems
- int port = AvailablePortFinder.getNextAvailable(9100);
+ int port = AvailablePortFinder.getNextAvailable();
String s = "port=" + port;
File custom = new File("target/custom.properties");
FileOutputStream fos = new FileOutputStream(custom);
Modified: camel/trunk/examples/camel-example-spring-jms/src/test/java/org/apache/camel/example/SpringJmsClientRemotingServerTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/examples/camel-example-spring-jms/src/test/java/org/apache/camel/example/SpringJmsClientRemotingServerTest.java?rev=1232763&r1=1232762&r2=1232763&view=diff
==============================================================================
--- camel/trunk/examples/camel-example-spring-jms/src/test/java/org/apache/camel/example/SpringJmsClientRemotingServerTest.java (original)
+++ camel/trunk/examples/camel-example-spring-jms/src/test/java/org/apache/camel/example/SpringJmsClientRemotingServerTest.java Wed Jan 18 07:04:09 2012
@@ -33,9 +33,9 @@ public class SpringJmsClientRemotingServ
@BeforeClass
public static void setupFreePort() throws Exception {
- // find a free port number from 9100 onwards, and write that in the custom.properties file
+ // find a free port number, and write that in the custom.properties file
// which we will use for the unit tests, to avoid port number in use problems
- int port = AvailablePortFinder.getNextAvailable(9100);
+ int port = AvailablePortFinder.getNextAvailable();
String bank1 = "tcp.port=" + port;
File custom = new File("target/custom.properties");
Modified: camel/trunk/examples/camel-example-spring-jms/src/test/java/org/apache/camel/example/SpringJmsClientServerTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/examples/camel-example-spring-jms/src/test/java/org/apache/camel/example/SpringJmsClientServerTest.java?rev=1232763&r1=1232762&r2=1232763&view=diff
==============================================================================
--- camel/trunk/examples/camel-example-spring-jms/src/test/java/org/apache/camel/example/SpringJmsClientServerTest.java (original)
+++ camel/trunk/examples/camel-example-spring-jms/src/test/java/org/apache/camel/example/SpringJmsClientServerTest.java Wed Jan 18 07:04:09 2012
@@ -34,9 +34,9 @@ public class SpringJmsClientServerTest e
@BeforeClass
public static void setupFreePort() throws Exception {
- // find a free port number from 9100 onwards, and write that in the custom.properties file
+ // find a free port number, and write that in the custom.properties file
// which we will use for the unit tests, to avoid port number in use problems
- int port = AvailablePortFinder.getNextAvailable(9100);
+ int port = AvailablePortFinder.getNextAvailable();
String bank1 = "tcp.port=" + port;
File custom = new File("target/custom.properties");