You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ni...@apache.org on 2015/03/05 08:52:15 UTC

camel git commit: Fixed the test error of DisruptorRemoveRouteThenAddAgainTest

Repository: camel
Updated Branches:
  refs/heads/master 6113870c7 -> 3a5800430


Fixed the test error of DisruptorRemoveRouteThenAddAgainTest


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/3a580043
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/3a580043
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/3a580043

Branch: refs/heads/master
Commit: 3a58004300848e4c1ae1508393499ae44fe0cc2a
Parents: 6113870
Author: Willem Jiang <wi...@gmail.com>
Authored: Thu Mar 5 15:08:06 2015 +0800
Committer: Willem Jiang <wi...@gmail.com>
Committed: Thu Mar 5 15:51:49 2015 +0800

----------------------------------------------------------------------
 .../disruptor/DisruptorRemoveRouteThenAddAgainTest.java       | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/3a580043/components/camel-disruptor/src/test/java/org/apache/camel/component/disruptor/DisruptorRemoveRouteThenAddAgainTest.java
----------------------------------------------------------------------
diff --git a/components/camel-disruptor/src/test/java/org/apache/camel/component/disruptor/DisruptorRemoveRouteThenAddAgainTest.java b/components/camel-disruptor/src/test/java/org/apache/camel/component/disruptor/DisruptorRemoveRouteThenAddAgainTest.java
index 5ef4181..b808206 100644
--- a/components/camel-disruptor/src/test/java/org/apache/camel/component/disruptor/DisruptorRemoveRouteThenAddAgainTest.java
+++ b/components/camel-disruptor/src/test/java/org/apache/camel/component/disruptor/DisruptorRemoveRouteThenAddAgainTest.java
@@ -38,15 +38,20 @@ public class DisruptorRemoveRouteThenAddAgainTest extends CamelTestSupport {
         // now stop & remove the route
         context.stopRoute("disruptorToMock");
         context.removeRoute("disruptorToMock");
-
+        
         // and then add it back again
         context.addRoutes(createRouteBuilder());
+        
+        // Here we need stop the template first
+        template.stop();
 
         // get mock endpoint again as we removed the route which removes the endpoint
         out = getMockEndpoint("mock:out");
         out.expectedMessageCount(1);
         out.expectedBodiesReceived("after removing the route");
 
+        // Restart the template again
+        template.start();
         template.sendBody("disruptor:in", "after removing the route");
 
         out.assertIsSatisfied();