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 2010/05/15 05:31:39 UTC

svn commit: r944552 - /camel/trunk/camel-core/src/test/java/org/apache/camel/management/ManagedRouteShutdownAndStartTest.java

Author: ningjiang
Date: Sat May 15 03:31:38 2010
New Revision: 944552

URL: http://svn.apache.org/viewvc?rev=944552&view=rev
Log:
CAMEL-2722 fixed the unit test failure of ManagedRouteShutdownAndStartTest

Modified:
    camel/trunk/camel-core/src/test/java/org/apache/camel/management/ManagedRouteShutdownAndStartTest.java

Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/management/ManagedRouteShutdownAndStartTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/management/ManagedRouteShutdownAndStartTest.java?rev=944552&r1=944551&r2=944552&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/management/ManagedRouteShutdownAndStartTest.java (original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/management/ManagedRouteShutdownAndStartTest.java Sat May 15 03:31:38 2010
@@ -57,12 +57,12 @@ public class ManagedRouteShutdownAndStar
         String state = (String) mbeanServer.getAttribute(on, "State");
         assertEquals("Should be started", ServiceStatus.Started.name(), state);
 
-        // stop
+        // calling the shutdown 
         mbeanServer.invoke(on, "shutdown", null, null);
 
-        state = (String) mbeanServer.getAttribute(on, "State");
-        assertEquals("Should be stopped", ServiceStatus.Stopped.name(), state);
-
+        // the managed route object should be removed
+        assertFalse("The managed route should be removed", mbeanServer.isRegistered(on));
+        
         mock.reset();
         mock.expectedBodiesReceived("Bye World");
         // wait 3 seconds while route is stopped to verify that file was not consumed
@@ -72,19 +72,7 @@ public class ManagedRouteShutdownAndStar
 
         // route is stopped so we do not get the file
         mock.assertIsNotSatisfied();
-
-        // prepare mock for starting route
-        mock.reset();
-        mock.expectedBodiesReceived("Bye World");
-
-        // start
-        mbeanServer.invoke(on, "start", null, null);
-
-        state = (String) mbeanServer.getAttribute(on, "State");
-        assertEquals("Should be started", ServiceStatus.Started.name(), state);
-
-        // this time the file is consumed
-        mock.assertIsSatisfied();
+        
     }
 
     @SuppressWarnings("unchecked")