Author: bvahdat Date: Fri Sep 28 07:40:44 2012 New Revision: 1391349 URL: http://svn.apache.org/viewvc?rev=1391349&view=rev Log: 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.10.x/ (props changed) camel/branches/camel-2.10.x/components/camel-spring/src/test/java/org/apache/camel/spring/config/DualCamelContextEndpointOutsideTest.java Propchange: camel/branches/camel-2.10.x/ ------------------------------------------------------------------------------ Merged /camel/trunk:r1391346 Propchange: camel/branches/camel-2.10.x/ ------------------------------------------------------------------------------ Binary property 'svnmerge-integrated' - no diff available. Modified: camel/branches/camel-2.10.x/components/camel-spring/src/test/java/org/apache/camel/spring/config/DualCamelContextEndpointOutsideTest.java URL: http://svn.apache.org/viewvc/camel/branches/camel-2.10.x/components/camel-spring/src/test/java/org/apache/camel/spring/config/DualCamelContextEndpointOutsideTest.java?rev=1391349&r1=1391348&r2=1391349&view=diff ============================================================================== --- camel/branches/camel-2.10.x/components/camel-spring/src/test/java/org/apache/camel/spring/config/DualCamelContextEndpointOutsideTest.java (original) +++ camel/branches/camel-2.10.x/components/camel-spring/src/test/java/org/apache/camel/spring/config/DualCamelContextEndpointOutsideTest.java Fri Sep 28 07:40:44 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();