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/05/24 13:43:45 UTC

svn commit: r1342206 - /camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/cxf/blueprint/CxfRsBlueprintRouterTest.java

Author: davsclaus
Date: Thu May 24 11:43:44 2012
New Revision: 1342206

URL: http://svn.apache.org/viewvc?rev=1342206&view=rev
Log:
Fixed test.

Modified:
    camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/cxf/blueprint/CxfRsBlueprintRouterTest.java

Modified: camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/cxf/blueprint/CxfRsBlueprintRouterTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/cxf/blueprint/CxfRsBlueprintRouterTest.java?rev=1342206&r1=1342205&r2=1342206&view=diff
==============================================================================
--- camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/cxf/blueprint/CxfRsBlueprintRouterTest.java (original)
+++ camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/cxf/blueprint/CxfRsBlueprintRouterTest.java Thu May 24 11:43:44 2012
@@ -79,8 +79,12 @@ public class CxfRsBlueprintRouterTest ex
         try {
             HttpResponse response = httpclient.execute(get);
             assertEquals(200, response.getStatusLine().getStatusCode());
-            assertEquals("{\"Customer\":{\"id\":123,\"name\":\"John\"}}", 
-                         EntityUtils.toString(response.getEntity()));
+
+            // should either by John or Mary depending on PUT test executed first
+            String s = EntityUtils.toString(response.getEntity());
+            boolean isJohn = "{\"Customer\":{\"id\":123,\"name\":\"John\"}}".equals(s);
+            boolean isMary = "{\"Customer\":{\"id\":123,\"name\":\"Mary\"}}".equals(s);
+            assertTrue("Should be John or Mary", isJohn || isMary);
         } finally {
             httpclient.getConnectionManager().shutdown();
         }