camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sander Mak <>
Subject Unexpected interceptor behavior
Date Mon, 20 Jun 2011 14:33:07 GMT
Hi all,

I'm trying to test an onException handler of my route by intercepting
a send on the main route and throwing an appropriate exception so that
the onException handling  is triggered. However, I ran into some
unexpected behavior. A simplified testcase reproduces this behavior:

I expect that the interceptSendToEndpoint on line 49 is triggered by
the message that is sent on line 69 using a producer template.
However, the interception is never performed, hence the exception is
never thrown and the testcase fails with "Success" != "Error".

However, while experimenting a bit I found out that I could get the
testcase to succeed by introducing a dummy direct endpoint in my main
route, and intercepting that endpoint instead of the activemq
endpoint:  (diff with previous failing
testcase: )

For me this was unexpected. How can I get my original testcase to
succeed without altering my route?



View raw message