Details
-
Bug
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
4.4.0
-
None
-
Unknown
Description
Given the following route template
routeTemplate("myRouteTemplate") .templateParameter("message") .from("timer:myTimer?period=5000") .log("{{message}}");
And given the following two routes based on that template
templatedRoute("myRouteTemplate") .parameter("message", "hello from first template") .routeId("firstroute"); templatedRoute("myRouteTemplate") .parameter("message", "hello from second template") .routeId("secondroute");
a JUnit test annotated with
@CamelMainTest(replaceRouteFromWith = {"firstroute=direct:start"})
will fail with
Failed to start route secondroute because of Multiple consumers for the same endpoint is not allowed: direct://start
See https://github.com/thomas-gantenbein-tga/camel-advicewithtest/blob/master/src/test/java/com/acme/ReplaceFromWithAnnotationTest.java for such a JUnit test that will fail.
The same happens with Spring Boot test, see https://github.com/thomas-gantenbein-tga/advicewithtest_springboot/blob/master/src/test/java/com/acme/WithAdviceWithAnnotationTest.java.
Tests do pass when the context is already started when advising it, see https://github.com/thomas-gantenbein-tga/advicewithtest_springboot/blob/master/src/test/java/com/acme/NoAdviceWithAnnotationTest.java#L38.
Attachments
Issue Links
- relates to
-
CAMEL-20614 KameletConsumerNotAvailableException is thrown when two or more threads call toD
- Resolved
- links to