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 2010/12/10 14:19:58 UTC
svn commit: r1044344 -
/camel/trunk/tests/camel-itest/src/test/java/org/apache/camel/itest/async/HttpAsyncDslTest.java
Author: davsclaus
Date: Fri Dec 10 13:19:57 2010
New Revision: 1044344
URL: http://svn.apache.org/viewvc?rev=1044344&view=rev
Log:
Fixed test.
Modified:
camel/trunk/tests/camel-itest/src/test/java/org/apache/camel/itest/async/HttpAsyncDslTest.java
Modified: camel/trunk/tests/camel-itest/src/test/java/org/apache/camel/itest/async/HttpAsyncDslTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/tests/camel-itest/src/test/java/org/apache/camel/itest/async/HttpAsyncDslTest.java?rev=1044344&r1=1044343&r2=1044344&view=diff
==============================================================================
--- camel/trunk/tests/camel-itest/src/test/java/org/apache/camel/itest/async/HttpAsyncDslTest.java (original)
+++ camel/trunk/tests/camel-itest/src/test/java/org/apache/camel/itest/async/HttpAsyncDslTest.java Fri Dec 10 13:19:57 2010
@@ -33,7 +33,7 @@ import org.junit.Test;
*/
public class HttpAsyncDslTest extends CamelTestSupport {
- private static String order = "";
+ private static volatile String order = "";
@Test
public void testRequestOnly() throws Exception {
@@ -46,7 +46,9 @@ public class HttpAsyncDslTest extends Ca
assertMockEndpointsSatisfied();
- assertEquals("CAB", order);
+ // B should be last (either ABC or BAC depending on threading)
+ assertEquals(3, order.length());
+ assertTrue(order.endsWith("B"));
}
@Test
@@ -60,6 +62,7 @@ public class HttpAsyncDslTest extends Ca
assertMockEndpointsSatisfied();
+ // should be in strict ABC order as we do request/reply
assertEquals("ABC", order);
assertEquals("Order OK", response);
}