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:
http://pastebin.com/L5Wuuy4P

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: http://pastebin.com/PdK6gTNb  (diff with previous failing
testcase: http://pastebin.com/vdHghPB1 )

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


Thanks,

Sander

Reply via email to