camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject svn commit: r1352579 - /camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsSplitterParallelChainedTest.java
Date Thu, 21 Jun 2012 15:48:54 GMT
Author: davsclaus
Date: Thu Jun 21 15:48:54 2012
New Revision: 1352579

URL: http://svn.apache.org/viewvc?rev=1352579&view=rev
Log:
Added test based on user forum issue

Added:
    camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsSplitterParallelChainedTest.java
      - copied, changed from r1352570, camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsSplitterParallelTest.java

Copied: camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsSplitterParallelChainedTest.java
(from r1352570, camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsSplitterParallelTest.java)
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsSplitterParallelChainedTest.java?p2=camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsSplitterParallelChainedTest.java&p1=camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsSplitterParallelTest.java&r1=1352570&r2=1352579&rev=1352579&view=diff
==============================================================================
--- camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsSplitterParallelTest.java
(original)
+++ camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsSplitterParallelChainedTest.java
Thu Jun 21 15:48:54 2012
@@ -27,19 +27,26 @@ import org.junit.Test;
 import static org.apache.camel.component.jms.JmsComponent.jmsComponentAutoAcknowledge;
 
 /**
+ * Test that chained request/reply over JMS works in parallel mode with the splitter EIP.
+ *
  * @version 
  */
-public class JmsSplitterParallelTest extends CamelTestSupport {
+public class JmsSplitterParallelChainedTest extends CamelTestSupport {
 
     protected String getUri() {
-        return "activemq:queue:foo?useMessageIDAsCorrelationID=true";
+        return "activemq:queue:foo";
+    }
+
+    protected String getUri2() {
+        return "activemq:queue:bar";
     }
 
     @Test
     public void testSplitParallel() throws Exception {
         getMockEndpoint("mock:result").expectedBodiesReceived("A,B,C,D,E");
-        getMockEndpoint("mock:reply").expectedBodiesReceivedInAnyOrder("Bye A", "Bye B",
"Bye C", "Bye D", "Bye E");
-        getMockEndpoint("mock:split").expectedBodiesReceivedInAnyOrder("Bye A", "Bye B",
"Bye C", "Bye D", "Bye E");
+        getMockEndpoint("mock:reply").expectedBodiesReceivedInAnyOrder("Hi A", "Hi B", "Hi
C", "Hi D", "Hi E");
+        getMockEndpoint("mock:reply2").expectedBodiesReceivedInAnyOrder("Bye Hi A", "Bye
Hi B", "Bye Hi C", "Bye Hi D", "Bye Hi E");
+        getMockEndpoint("mock:split").expectedBodiesReceivedInAnyOrder("Bye Hi A", "Bye Hi
B", "Bye Hi C", "Bye Hi D", "Bye Hi E");
 
         template.sendBody("direct:start", "A,B,C,D,E");
 
@@ -70,8 +77,13 @@ public class JmsSplitterParallelTest ext
                     .to("mock:result");
 
                 from(getUri())
+                    .transform(body().prepend("Hi "))
+                    .to("mock:reply")
+                    .to(ExchangePattern.InOut, getUri2());
+
+                from(getUri2())
                     .transform(body().prepend("Bye "))
-                    .to("mock:reply");
+                    .to("mock:reply2");
             }
         };
     }



Mime
View raw message