missing dependency testing cxfrs endpoint with CamelBlueprintTestSupport
scotta64 Sep 2, 2015 1:26 PMHi all - I've created a couple of simple routes as follows
/* Listener */
from("cxfrs:bean:canonService?bindingStyle=SimpleConsumer")
.log("GOT A REQUEST, ADDING TO QUEUE")
.to("direct:incomingRequestQueue");
/* Processor */
from("direct:incomingRequestQueue")
.log("PROCESSOR GET REQUEST FROM QUEUE")
.process(new Processor() {*** bunch of code here***})
.log("PROCESSOR DONE PROCESSING REQUEST");
I have a number of tests written using CamelBlueprintTestSupport with methods that test just the Processor route by sending a message to the "direct:incomingRequestQueue" and which also test the Listener route (and thus, presumably the Processor route as well) by sending a message to the "cxfrs:bean..." endpoint. Whenever I run a Maven task that executes my tests, the tests hang with the following message appearing in the log
BlueprintContainerImpl Bundle TestCanonRoute/1.0.0 is waiting for dependencies [(&(component=cxfrs)(objectClass=org.apache.camel.spi.ComponentResolver))]
and eventually the test times out and fails. The project pom.xml and blueprint.xml files are attached. Since I do have a <dependency> entry for camel-core (which contains the class org.apache.camel.spi.ComponentResolver) and one for camel-cxf (which contains a camel.osgi.export.service property for org.apache.camel.spi.ComponentResolver;component=cxfrs), near as I can tell, I've got everything mentioned in the waiting for message and shouldn't have to wait for anything. Whats more, if remove my cxf route test classes from my project source, everything works great, the bundle gets built, deploys successfully and the cxf listener route does in fact start up. Which also leads me to believe I've got all the dependencies I need to cxfrs work, at least within the context of a container. So I guess I'm missing something at test time the container provides ... but what?
FWIW, I've already found this discussion here which is sort of addressing a similar issue re: testing CXF with the CamelBlueprintTestSupport. Accordingly, I have added a dependency for asm-all v4.0 to the test scope. That did resolve some other issues w/my tests, but has left me with this current vexing problem which I'm sure is addressed by adding some test scoped dependency to my pom ... but which one?
-
blueprint.xml.zip 1.2 KB
-
pom.xml.zip 1.9 KB