Author: davsclaus Date: Wed Jan 18 07:10:02 2012 New Revision: 1232765 URL: http://svn.apache.org/viewvc?rev=1232765&view=rev Log: CAMEL-4814 Use dynamic port numbers for testing examples.
Modified: camel/branches/camel-2.9.x/ (props changed) camel/branches/camel-2.9.x/examples/camel-example-cxf-blueprint/src/test/java/org/apache/camel/example/reportincident/ReportIncidentRoutesClientTest.java camel/branches/camel-2.9.x/examples/camel-example-cxf-proxy/src/test/java/org/apache/camel/example/reportincident/ReportIncidentRoutesTest.java camel/branches/camel-2.9.x/examples/camel-example-loan-broker/src/test/java/org/apache/camel/loanbroker/webservice/version/LoanBrokerWSTest.java camel/branches/camel-2.9.x/examples/camel-example-osgi-rmi/src/test/java/org/apache/camel/example/osgi/RmiTest.java camel/branches/camel-2.9.x/examples/camel-example-reportincident-wssecurity/src/test/java/org/apache/camel/example/reportincident/ReportIncidentRoutesTest.java camel/branches/camel-2.9.x/examples/camel-example-reportincident/src/test/java/org/apache/camel/example/reportincident/ReportIncidentRoutesTest.java camel/branches/camel-2.9.x/examples/camel-example-spring-jms/src/test/java/org/apache/camel/example/SpringJmsClientRemotingServerTest.java camel/branches/camel-2.9.x/examples/camel-example-spring-jms/src/test/java/org/apache/camel/example/SpringJmsClientServerTest.java Propchange: camel/branches/camel-2.9.x/ ------------------------------------------------------------------------------ --- svn:mergeinfo (original) +++ svn:mergeinfo Wed Jan 18 07:10:02 2012 @@ -1 +1 @@ -/camel/trunk:1227209,1227212,1227540,1228015,1228027,1228223,1228879,1229565,1231135,1231704,1232309,1232312,1232429 +/camel/trunk:1227209,1227212,1227540,1228015,1228027,1228223,1228879,1229565,1231135,1231704,1232309,1232312,1232429,1232763 Propchange: camel/branches/camel-2.9.x/ ------------------------------------------------------------------------------ --- svnmerge-integrated (original) +++ svnmerge-integrated Wed Jan 18 07:10:02 2012 @@ -1 +1 @@ -/camel/trunk:1-1227196,1227209,1227212,1227540,1228015,1228027,1228223,1228879,1229565,1231135,1231704,1232309,1232312,1232429 +/camel/trunk:1-1227196,1227209,1227212,1227540,1228015,1228027,1228223,1228879,1229565,1231135,1231704,1232309,1232312,1232429,1232763 Modified: camel/branches/camel-2.9.x/examples/camel-example-cxf-blueprint/src/test/java/org/apache/camel/example/reportincident/ReportIncidentRoutesClientTest.java URL: http://svn.apache.org/viewvc/camel/branches/camel-2.9.x/examples/camel-example-cxf-blueprint/src/test/java/org/apache/camel/example/reportincident/ReportIncidentRoutesClientTest.java?rev=1232765&r1=1232764&r2=1232765&view=diff ============================================================================== --- camel/branches/camel-2.9.x/examples/camel-example-cxf-blueprint/src/test/java/org/apache/camel/example/reportincident/ReportIncidentRoutesClientTest.java (original) +++ camel/branches/camel-2.9.x/examples/camel-example-cxf-blueprint/src/test/java/org/apache/camel/example/reportincident/ReportIncidentRoutesClientTest.java Wed Jan 18 07:10:02 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/branches/camel-2.9.x/examples/camel-example-cxf-proxy/src/test/java/org/apache/camel/example/reportincident/ReportIncidentRoutesTest.java URL: http://svn.apache.org/viewvc/camel/branches/camel-2.9.x/examples/camel-example-cxf-proxy/src/test/java/org/apache/camel/example/reportincident/ReportIncidentRoutesTest.java?rev=1232765&r1=1232764&r2=1232765&view=diff ============================================================================== --- camel/branches/camel-2.9.x/examples/camel-example-cxf-proxy/src/test/java/org/apache/camel/example/reportincident/ReportIncidentRoutesTest.java (original) +++ camel/branches/camel-2.9.x/examples/camel-example-cxf-proxy/src/test/java/org/apache/camel/example/reportincident/ReportIncidentRoutesTest.java Wed Jan 18 07:10:02 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/branches/camel-2.9.x/examples/camel-example-loan-broker/src/test/java/org/apache/camel/loanbroker/webservice/version/LoanBrokerWSTest.java URL: http://svn.apache.org/viewvc/camel/branches/camel-2.9.x/examples/camel-example-loan-broker/src/test/java/org/apache/camel/loanbroker/webservice/version/LoanBrokerWSTest.java?rev=1232765&r1=1232764&r2=1232765&view=diff ============================================================================== --- camel/branches/camel-2.9.x/examples/camel-example-loan-broker/src/test/java/org/apache/camel/loanbroker/webservice/version/LoanBrokerWSTest.java (original) +++ camel/branches/camel-2.9.x/examples/camel-example-loan-broker/src/test/java/org/apache/camel/loanbroker/webservice/version/LoanBrokerWSTest.java Wed Jan 18 07:10:02 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/branches/camel-2.9.x/examples/camel-example-osgi-rmi/src/test/java/org/apache/camel/example/osgi/RmiTest.java URL: http://svn.apache.org/viewvc/camel/branches/camel-2.9.x/examples/camel-example-osgi-rmi/src/test/java/org/apache/camel/example/osgi/RmiTest.java?rev=1232765&r1=1232764&r2=1232765&view=diff ============================================================================== --- camel/branches/camel-2.9.x/examples/camel-example-osgi-rmi/src/test/java/org/apache/camel/example/osgi/RmiTest.java (original) +++ camel/branches/camel-2.9.x/examples/camel-example-osgi-rmi/src/test/java/org/apache/camel/example/osgi/RmiTest.java Wed Jan 18 07:10:02 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/branches/camel-2.9.x/examples/camel-example-reportincident-wssecurity/src/test/java/org/apache/camel/example/reportincident/ReportIncidentRoutesTest.java URL: http://svn.apache.org/viewvc/camel/branches/camel-2.9.x/examples/camel-example-reportincident-wssecurity/src/test/java/org/apache/camel/example/reportincident/ReportIncidentRoutesTest.java?rev=1232765&r1=1232764&r2=1232765&view=diff ============================================================================== --- camel/branches/camel-2.9.x/examples/camel-example-reportincident-wssecurity/src/test/java/org/apache/camel/example/reportincident/ReportIncidentRoutesTest.java (original) +++ camel/branches/camel-2.9.x/examples/camel-example-reportincident-wssecurity/src/test/java/org/apache/camel/example/reportincident/ReportIncidentRoutesTest.java Wed Jan 18 07:10:02 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/branches/camel-2.9.x/examples/camel-example-reportincident/src/test/java/org/apache/camel/example/reportincident/ReportIncidentRoutesTest.java URL: http://svn.apache.org/viewvc/camel/branches/camel-2.9.x/examples/camel-example-reportincident/src/test/java/org/apache/camel/example/reportincident/ReportIncidentRoutesTest.java?rev=1232765&r1=1232764&r2=1232765&view=diff ============================================================================== --- camel/branches/camel-2.9.x/examples/camel-example-reportincident/src/test/java/org/apache/camel/example/reportincident/ReportIncidentRoutesTest.java (original) +++ camel/branches/camel-2.9.x/examples/camel-example-reportincident/src/test/java/org/apache/camel/example/reportincident/ReportIncidentRoutesTest.java Wed Jan 18 07:10:02 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/branches/camel-2.9.x/examples/camel-example-spring-jms/src/test/java/org/apache/camel/example/SpringJmsClientRemotingServerTest.java URL: http://svn.apache.org/viewvc/camel/branches/camel-2.9.x/examples/camel-example-spring-jms/src/test/java/org/apache/camel/example/SpringJmsClientRemotingServerTest.java?rev=1232765&r1=1232764&r2=1232765&view=diff ============================================================================== --- camel/branches/camel-2.9.x/examples/camel-example-spring-jms/src/test/java/org/apache/camel/example/SpringJmsClientRemotingServerTest.java (original) +++ camel/branches/camel-2.9.x/examples/camel-example-spring-jms/src/test/java/org/apache/camel/example/SpringJmsClientRemotingServerTest.java Wed Jan 18 07:10:02 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/branches/camel-2.9.x/examples/camel-example-spring-jms/src/test/java/org/apache/camel/example/SpringJmsClientServerTest.java URL: http://svn.apache.org/viewvc/camel/branches/camel-2.9.x/examples/camel-example-spring-jms/src/test/java/org/apache/camel/example/SpringJmsClientServerTest.java?rev=1232765&r1=1232764&r2=1232765&view=diff ============================================================================== --- camel/branches/camel-2.9.x/examples/camel-example-spring-jms/src/test/java/org/apache/camel/example/SpringJmsClientServerTest.java (original) +++ camel/branches/camel-2.9.x/examples/camel-example-spring-jms/src/test/java/org/apache/camel/example/SpringJmsClientServerTest.java Wed Jan 18 07:10:02 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");