camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lawrence <>
Subject CamelContext not loaded during Tests
Date Tue, 14 May 2013 15:00:16 GMT

I am kind of new to Camel, and I can't figure out why my camel context is
not loaded when running my tests.
I want to configure my context properly before deep diving into code, and
even with a basic example, and I can't make it.

I'd like to test existing routes (to avoid duplicating routes in code and
tests). I am pretty clear with adviceWith() and weave*(), but when I start
my tests, I have no routes loaded resulting in some NPE when calling
I use some mongoDB bean (but this works fine, no worries on that) that input
5 messages in the route.
I try to weave a mockEndpoint at the end of my route to check that the 5
messages get there.

My guess is that as the camel-context has its own @id, I should load this
particular context, not the default CamelContext, but
1/ if I anonymise the context (get rid of the @id), I still have the same
problem (which makes me say it is not such a good hint...)
2/ I can't find how to grab the named context

Any help appreciated!

Here are my samples:

eholder location="classpath:**.properties"/>
//blabla + some beans






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

View raw message