Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
2.8.3
-
None
-
Unknown
Description
Christian reported a camel route stop issue few months ago[1], I found this bug by running the unit test he submit.
public class RouteRemoveTest extends ContextTestSupport { + public void testStopRouteOnContext() throws Exception { + assertEquals(ServiceStatus.Started, ((DefaultRoute) context.getRoute("foo")).getStatus()); + assertEquals(ServiceStatus.Started, context.getRouteStatus("foo")); + + context.stopRoute("foo"); + + assertEquals(ServiceStatus.Stopped, ((DefaultRoute) context.getRoute("foo")).getStatus()); + assertEquals(ServiceStatus.Stopped, context.getRouteStatus("foo")); + }
The route foo should not be removed from the camelContext.
[1] http://camel.465427.n5.nabble.com/Stop-a-route-for-unit-testing-tt4724550.html#a5011082