camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject svn commit: r1407993 - in /camel/branches/camel-2.10.x: ./ components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsAsyncStartListenerTest.java components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsAsyncStopListenerTest.java
Date Sun, 11 Nov 2012 14:08:56 GMT
Author: davsclaus
Date: Sun Nov 11 14:08:55 2012
New Revision: 1407993

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

Modified:
    camel/branches/camel-2.10.x/   (props changed)
    camel/branches/camel-2.10.x/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsAsyncStartListenerTest.java
    camel/branches/camel-2.10.x/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsAsyncStopListenerTest.java

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

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

Modified: camel/branches/camel-2.10.x/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsAsyncStartListenerTest.java
URL: http://svn.apache.org/viewvc/camel/branches/camel-2.10.x/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsAsyncStartListenerTest.java?rev=1407993&r1=1407992&r2=1407993&view=diff
==============================================================================
--- camel/branches/camel-2.10.x/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsAsyncStartListenerTest.java
(original)
+++ camel/branches/camel-2.10.x/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsAsyncStartListenerTest.java
Sun Nov 11 14:08:55 2012
@@ -40,8 +40,8 @@ public class JmsAsyncStartListenerTest e
         MockEndpoint result = getMockEndpoint("mock:result");
         result.expectedMessageCount(2);
 
-        template.requestBody("activemq:queue:hello", "Hello World");
-        template.requestBody("activemq:queue:hello", "Gooday World");
+        template.sendBody("activemq:queue:hello", "Hello World");
+        template.sendBody("activemq:queue:hello", "Gooday World");
 
         result.assertIsSatisfied();
     }
@@ -62,11 +62,7 @@ public class JmsAsyncStartListenerTest e
     protected RouteBuilder createRouteBuilder() throws Exception {
         return new RouteBuilder() {
             public void configure() throws Exception {
-                from("activemq:queue:hello").process(new Processor() {
-                    public void process(Exchange exchange) throws Exception {
-                        exchange.getIn().setBody("Bye World");
-                    }
-                }).to("mock:result");
+                from("activemq:queue:hello").to("mock:result");
             }
         };
     }

Modified: camel/branches/camel-2.10.x/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsAsyncStopListenerTest.java
URL: http://svn.apache.org/viewvc/camel/branches/camel-2.10.x/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsAsyncStopListenerTest.java?rev=1407993&r1=1407992&r2=1407993&view=diff
==============================================================================
--- camel/branches/camel-2.10.x/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsAsyncStopListenerTest.java
(original)
+++ camel/branches/camel-2.10.x/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsAsyncStopListenerTest.java
Sun Nov 11 14:08:55 2012
@@ -19,8 +19,6 @@ package org.apache.camel.component.jms;
 import javax.jms.ConnectionFactory;
 
 import org.apache.camel.CamelContext;
-import org.apache.camel.Exchange;
-import org.apache.camel.Processor;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.mock.MockEndpoint;
 import org.apache.camel.test.junit4.CamelTestSupport;
@@ -40,8 +38,8 @@ public class JmsAsyncStopListenerTest ex
         MockEndpoint result = getMockEndpoint("mock:result");
         result.expectedMessageCount(2);
 
-        template.requestBody("activemq:queue:hello", "Hello World");
-        template.requestBody("activemq:queue:hello", "Gooday World");
+        template.sendBody("activemq:queue:hello", "Hello World");
+        template.sendBody("activemq:queue:hello", "Gooday World");
 
         result.assertIsSatisfied();
     }
@@ -49,9 +47,7 @@ public class JmsAsyncStopListenerTest ex
     protected CamelContext createCamelContext() throws Exception {
         CamelContext camelContext = super.createCamelContext();
 
-        // use a persistent queue as the consumer is started asynchronously
-        // so we need a persistent store in case no active consumers when we send the messages
-        ConnectionFactory connectionFactory = CamelJmsTestHelper.createPersistentConnectionFactory();
+        ConnectionFactory connectionFactory = CamelJmsTestHelper.createConnectionFactory();
         JmsComponent jms = jmsComponentAutoAcknowledge(connectionFactory);
         jms.setAsyncStopListener(true);
         camelContext.addComponent(componentName, jms);
@@ -62,11 +58,7 @@ public class JmsAsyncStopListenerTest ex
     protected RouteBuilder createRouteBuilder() throws Exception {
         return new RouteBuilder() {
             public void configure() throws Exception {
-                from("activemq:queue:hello").process(new Processor() {
-                    public void process(Exchange exchange) throws Exception {
-                        exchange.getIn().setBody("Bye World");
-                    }
-                }).to("mock:result");
+                from("activemq:queue:hello").to("mock:result");
             }
         };
     }



Mime
View raw message