camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject svn commit: r1412013 - in /camel/branches/camel-2.10.x: ./ tests/camel-itest/src/test/java/org/apache/camel/itest/async/
Date Wed, 21 Nov 2012 08:29:16 GMT
Author: davsclaus
Date: Wed Nov 21 08:29:16 2012
New Revision: 1412013

URL: http://svn.apache.org/viewvc?rev=1412013&view=rev
Log:
Fixed test to use dynamic ports

Modified:
    camel/branches/camel-2.10.x/   (props changed)
    camel/branches/camel-2.10.x/tests/camel-itest/src/test/java/org/apache/camel/itest/async/HttpAsyncTest.java
    camel/branches/camel-2.10.x/tests/camel-itest/src/test/java/org/apache/camel/itest/async/HttpJmsAsyncTimeoutTest.java
    camel/branches/camel-2.10.x/tests/camel-itest/src/test/java/org/apache/camel/itest/async/HttpSyncTest.java

Propchange: camel/branches/camel-2.10.x/
------------------------------------------------------------------------------
  Merged /camel/trunk:r1412012

Propchange: camel/branches/camel-2.10.x/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Modified: camel/branches/camel-2.10.x/tests/camel-itest/src/test/java/org/apache/camel/itest/async/HttpAsyncTest.java
URL: http://svn.apache.org/viewvc/camel/branches/camel-2.10.x/tests/camel-itest/src/test/java/org/apache/camel/itest/async/HttpAsyncTest.java?rev=1412013&r1=1412012&r2=1412013&view=diff
==============================================================================
--- camel/branches/camel-2.10.x/tests/camel-itest/src/test/java/org/apache/camel/itest/async/HttpAsyncTest.java
(original)
+++ camel/branches/camel-2.10.x/tests/camel-itest/src/test/java/org/apache/camel/itest/async/HttpAsyncTest.java
Wed Nov 21 08:29:16 2012
@@ -71,7 +71,7 @@ public class HttpAsyncTest extends HttpA
                 from("direct:name").transform(constant("Claus")).to("mock:result");
 
                 // Simulate a slow http service (delaying 1 sec) we want to invoke async
-                from("jetty:http://0.0.0.0:" + getPort() + "/myservice")
+                fromF("jetty:http://0.0.0.0:%s/myservice", getPort())
                     .delay(1000)
                     .transform(constant("Bye World"))
                     .to("mock:result");

Modified: camel/branches/camel-2.10.x/tests/camel-itest/src/test/java/org/apache/camel/itest/async/HttpJmsAsyncTimeoutTest.java
URL: http://svn.apache.org/viewvc/camel/branches/camel-2.10.x/tests/camel-itest/src/test/java/org/apache/camel/itest/async/HttpJmsAsyncTimeoutTest.java?rev=1412013&r1=1412012&r2=1412013&view=diff
==============================================================================
--- camel/branches/camel-2.10.x/tests/camel-itest/src/test/java/org/apache/camel/itest/async/HttpJmsAsyncTimeoutTest.java
(original)
+++ camel/branches/camel-2.10.x/tests/camel-itest/src/test/java/org/apache/camel/itest/async/HttpJmsAsyncTimeoutTest.java
Wed Nov 21 08:29:16 2012
@@ -60,7 +60,7 @@ public class HttpJmsAsyncTimeoutTest ext
                 // a lot of timeouts in the play :)
 
                 // jetty will timeout after 2 seconds
-                from("jetty:http://0.0.0.0:" + getPort() + "/myservice?continuationTimeout=2000")
+                fromF("jetty:http://0.0.0.0:%s/myservice?continuationTimeout=2000", getPort())
                     // jms request/reply will timeout after 5 seconds
                     .to("jms:queue:foo?requestTimeout=5000");
 

Modified: camel/branches/camel-2.10.x/tests/camel-itest/src/test/java/org/apache/camel/itest/async/HttpSyncTest.java
URL: http://svn.apache.org/viewvc/camel/branches/camel-2.10.x/tests/camel-itest/src/test/java/org/apache/camel/itest/async/HttpSyncTest.java?rev=1412013&r1=1412012&r2=1412013&view=diff
==============================================================================
--- camel/branches/camel-2.10.x/tests/camel-itest/src/test/java/org/apache/camel/itest/async/HttpSyncTest.java
(original)
+++ camel/branches/camel-2.10.x/tests/camel-itest/src/test/java/org/apache/camel/itest/async/HttpSyncTest.java
Wed Nov 21 08:29:16 2012
@@ -18,13 +18,12 @@ package org.apache.camel.itest.async;
 
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.mock.MockEndpoint;
-import org.apache.camel.test.junit4.CamelTestSupport;
 import org.junit.Test;
 
 /**
  * @version 
  */
-public class HttpSyncTest extends CamelTestSupport {
+public class HttpSyncTest extends HttpAsyncTestSupport {
 
     @Test
     public void testSyncAndSyncAtSameTimeWithHttp() throws Exception {
@@ -34,7 +33,7 @@ public class HttpSyncTest extends CamelT
         mock.expectedBodiesReceived("Bye World", "Claus");
 
         // Send a sync request/reply message to the http endpoint
-        String response = template.requestBody("http://0.0.0.0:9080/myservice", "Hello World",
String.class);
+        String response = template.requestBody("http://0.0.0.0:" + getPort() + "/myservice",
"Hello World", String.class);
         assertEquals("Bye World", response);
 
         // Send a sync request/reply message to the direct endpoint
@@ -57,7 +56,7 @@ public class HttpSyncTest extends CamelT
                 from("direct:name").transform(constant("Claus")).to("mock:result");
 
                 // Simulate a slow http service (delaying 1 sec) we want to invoke async
-                from("jetty:http://0.0.0.0:9080/myservice")
+                fromF("jetty:http://0.0.0.0:%s/myservice", getPort())
                     .delay(1000)
                     .transform(constant("Bye World"))
                     .to("mock:result");



Mime
View raw message