camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hartmut Lang (JIRA)" <j...@apache.org>
Subject [jira] [Created] (CAMEL-5432) Dynamically added SEDA-route is not working
Date Mon, 09 Jul 2012 08:06:33 GMT
Hartmut Lang created CAMEL-5432:
-----------------------------------

             Summary: Dynamically added SEDA-route is not working
                 Key: CAMEL-5432
                 URL: https://issues.apache.org/jira/browse/CAMEL-5432
             Project: Camel
          Issue Type: Bug
          Components: camel-core
    Affects Versions: 2.10.0
            Reporter: Hartmut Lang


Dynamically removing and adding a SEDA-route creates a not working route in Camel 2.10.0.
It is working in 2.9.2.

Test-Code:
{code}
public class DynamicRouteTest extends CamelTestSupport {

    @Override
    protected RouteBuilder createRouteBuilder() throws Exception {
        return new RouteBuilder() {

            @Override
            public void configure() throws Exception {
                from("seda:in").id("sedaToMock").to("mock:out");
            }
        };
    }
    
    @Test
    public void testDynamicRoute() throws Exception {
        MockEndpoint out = getMockEndpoint("mock:out");
        out.expectedMessageCount(1);
        
        template.sendBody("seda:in", "Test Message");
        
        out.assertIsSatisfied();
        
        CamelContext camelContext = out.getCamelContext();
        camelContext.stopRoute("sedaToMock");
        camelContext.removeRoute("sedaToMock");
        
        camelContext.addRoutes(createRouteBuilder());
        out.reset();
        out.expectedMessageCount(1);
        
        template.sendBody("seda:in", "Test Message");
        
        out.assertIsSatisfied();
        
    }
} 

{code}

--
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

        

Mime
View raw message