You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Claus Ibsen (Commented) (JIRA)" <ji...@apache.org> on 2011/12/17 15:18:30 UTC
[jira] [Commented] (CAMEL-4790) Using the
CamelContext.stopRoute(routeId) should not remove the route from context
[ https://issues.apache.org/jira/browse/CAMEL-4790?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13171578#comment-13171578 ]
Claus Ibsen commented on CAMEL-4790:
------------------------------------
Willem is this an issue in Camel 2.8.x as well? If so please backport the fix.
> Using the CamelContext.stopRoute(routeId) should not remove the route from context
> ----------------------------------------------------------------------------------
>
> Key: CAMEL-4790
> URL: https://issues.apache.org/jira/browse/CAMEL-4790
> Project: Camel
> Issue Type: Bug
> Components: camel-core
> Affects Versions: 2.8.3
> Reporter: Willem Jiang
> Assignee: Willem Jiang
> Fix For: 2.9.0
>
>
> Christian reported a camel route stop issue few months ago[1], I found this bug by running the unit test he submit.
> {code}
> 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"));
> + }
> {code}
> 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
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira