camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John <>
Subject errorHandler when stopping routes in test
Date Mon, 10 Jan 2011 15:54:49 GMT


I'm running 2.6-SNAPSHOT.

I have a route builder that sets up a number of routes. One of the routes is
a timer route.

For my unit tests, I would like to stop the timer route so that it doesn't
fire. Unfortunately when I stop the timer route, it appears to impact the
overall error handler.

An example of my route builder is:

            public void configure() throws Exception {




I am attempting to test the "TestRoute" and the error handler. In the test
itself, I intercept and throw an exception on the seda end point. I also
intercept the smtp endpoint with a mock. 

I expect the exceptions thrown on the seda endpoint to go through the error
handler and eventually hit the smtp endpoint when the retries are exhausted.

If I stop the "pollRoute" before running my test, I get an error:
    java.lang.IllegalStateException: SendProcessor has not been started:
sendTo(Endpoint[direct://emailSupport] InOnly)

Everything works as expected if I leave the timer route running.

If you have any ideas on what may be going on here, I'd appreciate it!


View this message in context:
Sent from the Camel - Users mailing list archive at

View raw message