You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by bv...@apache.org on 2012/09/28 09:43:40 UTC
svn commit: r1391350 - in /camel/branches/camel-2.9.x: ./
components/camel-spring/src/test/java/org/apache/camel/spring/config/DualCamelContextEndpointOutsideTest.java
Author: bvahdat
Date: Fri Sep 28 07:43:40 2012
New Revision: 1391350
URL: http://svn.apache.org/viewvc?rev=1391350&view=rev
Log:
Merged revisions 1391349 via svnmerge from
https://svn.apache.org/repos/asf/camel/branches/camel-2.10.x
................
r1391349 | bvahdat | 2012-09-28 09:40:44 +0200 (Fr, 28 Sep 2012) | 9 lines
Merged revisions 1391346 via svnmerge from
https://svn.apache.org/repos/asf/camel/trunk
........
r1391346 | bvahdat | 2012-09-28 09:36:23 +0200 (Fr, 28 Sep 2012) | 1 line
Properly stop the services we create on our own.
........
................
Modified:
camel/branches/camel-2.9.x/ (props changed)
camel/branches/camel-2.9.x/components/camel-spring/src/test/java/org/apache/camel/spring/config/DualCamelContextEndpointOutsideTest.java
Propchange: camel/branches/camel-2.9.x/
------------------------------------------------------------------------------
Merged /camel/trunk:r1391346
Merged /camel/branches/camel-2.10.x:r1391349
Propchange: camel/branches/camel-2.9.x/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.
Modified: camel/branches/camel-2.9.x/components/camel-spring/src/test/java/org/apache/camel/spring/config/DualCamelContextEndpointOutsideTest.java
URL: http://svn.apache.org/viewvc/camel/branches/camel-2.9.x/components/camel-spring/src/test/java/org/apache/camel/spring/config/DualCamelContextEndpointOutsideTest.java?rev=1391350&r1=1391349&r2=1391350&view=diff
==============================================================================
--- camel/branches/camel-2.9.x/components/camel-spring/src/test/java/org/apache/camel/spring/config/DualCamelContextEndpointOutsideTest.java (original)
+++ camel/branches/camel-2.9.x/components/camel-spring/src/test/java/org/apache/camel/spring/config/DualCamelContextEndpointOutsideTest.java Fri Sep 28 07:43:40 2012
@@ -17,8 +17,10 @@
package org.apache.camel.spring.config;
import org.apache.camel.CamelContext;
+import org.apache.camel.ProducerTemplate;
import org.apache.camel.component.mock.MockEndpoint;
import org.apache.camel.spring.SpringTestSupport;
+import org.apache.camel.util.ServiceHelper;
import org.springframework.context.support.AbstractXmlApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
@@ -44,8 +46,14 @@ public class DualCamelContextEndpointOut
MockEndpoint mockB = camelB.getEndpoint("mock:mock2", MockEndpoint.class);
mockB.expectedBodiesReceived("Hello B");
- camelA.createProducerTemplate().sendBody("direct:start1", "Hello A");
- camelB.createProducerTemplate().sendBody("direct:start2", "Hello B");
+ ProducerTemplate producer1 = camelA.createProducerTemplate();
+ producer1.sendBody("direct:start1", "Hello A");
+
+ ProducerTemplate producer2 = camelB.createProducerTemplate();
+ producer2.sendBody("direct:start2", "Hello B");
+
+ // make sure we properly stop the services we created
+ ServiceHelper.stopServices(producer1, producer2);
mockA.assertIsSatisfied();
mockB.assertIsSatisfied();