AW: MockEndpoint does not receive message if error occures in subroute

2018-01-03 Thread Burkard Stephan
OK, that is quite calming. I almost began to review the error handling of all Camel applications with subroutes. But the fact that it worked in the real runtime environment was an indicator that it is "just" a test setup problem. Perhaps it is another problem of the Spring-Boot test

Re: MockEndpoint does not receive message if error occures in subroute

2018-01-03 Thread Quinn Stevenson
I looked at the test again, and I’m pretty sure the issue has something to do with the initialization logic. I re-wrote the same tests using CamelTestSupport and they both pass (without the addition of the NoErrorHandlerBuilder). public class CamelRouteTest extends CamelTestSupport {

AW: MockEndpoint does not receive message if error occures in subroute

2018-01-03 Thread Burkard Stephan
Thanks Quinn. I knew that "global" onException clauses are only scoped to their RouteBuilder. Follow-up question: Why are they not working for a subroute inside the same RouteBuilder? Context for other readers: In the following example, the onException clause works fine for the

Re: MockEndpoint does not receive message if error occures in subroute

2017-12-20 Thread Quinn Stevenson
I’m not sure why this is working in the real world, but the reason the test is failing is the default error handler is picking up the exception from the call to the direct://Validate route. If you add ".errorHandler(new NoErrorHandlerBuilder())” to the direct://Validate route, your test