You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by "SirSkizo (via GitHub)" <gi...@apache.org> on 2023/05/25 09:13:15 UTC

[GitHub] [camel-quarkus] SirSkizo commented on issue #4927: Error No consumers available on endpoint in Unit test with yaml routes

SirSkizo commented on issue #4927:
URL: https://github.com/apache/camel-quarkus/issues/4927#issuecomment-1562561063

   I found this interesting message in the class `CamelQuarkusTestSupport`.
   ```java
       @Override
       protected final void doQuarkusCheck() {
           //can run on Quarkus
   
           //log warning in case that at least one RouteBuilder in the registry, it might mean, that unintentionally
           // RouteBuilders are shared across or that RouteBuilder is created with @Produces
           if (isUseRouteBuilder() && !context.getRegistry().findByType(RouteBuilder.class).isEmpty()) {
               LOG.warn(
                       "Test with `true` in `isUserRouteBuilder' and `RouteBuilder` detected in the context registry. " +
                               "All tests will share this routeBuilder from the registry. This is usually not intended. " +
                               "If `@Produces` is used to create such a RouteBuilder, please refactor the code " +
                               "by overriding the method `createRouteBuilder()` instead.");
           }
       }
   ```
   But I did NOT use any @Produces on my code. Then problem is that I cannot use yaml routes if I nned to override the previous method (`RoutesBuilder`) in the test. It can be an error on the extension:
   
   ```xml
       <dependency>
               <groupId>org.apache.camel.quarkus</groupId>
               <artifactId>camel-quarkus-yaml-dsl</artifactId>
       </dependency>
   ```
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org