Return-Path: X-Original-To: apmail-camel-issues-archive@minotaur.apache.org Delivered-To: apmail-camel-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 7F62C7B23 for ; Sat, 17 Dec 2011 14:44:59 +0000 (UTC) Received: (qmail 34658 invoked by uid 500); 17 Dec 2011 14:44:59 -0000 Delivered-To: apmail-camel-issues-archive@camel.apache.org Received: (qmail 34635 invoked by uid 500); 17 Dec 2011 14:44:59 -0000 Mailing-List: contact issues-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@camel.apache.org Delivered-To: mailing list issues@camel.apache.org Received: (qmail 34628 invoked by uid 99); 17 Dec 2011 14:44:59 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 17 Dec 2011 14:44:59 +0000 X-ASF-Spam-Status: No, hits=-2000.1 required=5.0 tests=ALL_TRUSTED,RP_MATCHES_RCVD,URI_HEX X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 17 Dec 2011 14:44:51 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 7E5BC118A43 for ; Sat, 17 Dec 2011 14:44:30 +0000 (UTC) Date: Sat, 17 Dec 2011 14:44:30 +0000 (UTC) From: "Willem Jiang (Commented) (JIRA)" To: issues@camel.apache.org Message-ID: <1699887802.22591.1324133070519.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <2013992910.22228.1324109130549.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (CAMEL-4790) Using the CamelContext.stopRoute(routeId) should not remove the route from context MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CAMEL-4790?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13171581#comment-13171581 ] Willem Jiang commented on CAMEL-4790: ------------------------------------- @Claus, I just committed the backport fix of Camel 2.8.x after resolving some network connect issue. > 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.8.4, 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