Gems commented on code in PR #13393:
URL: https://github.com/apache/camel/pull/13393#discussion_r1804854431


##########
components/camel-micrometer/src/test/java/org/apache/camel/component/micrometer/routepolicy/AbstractMicrometerRoutePolicyTest.java:
##########
@@ -57,10 +52,25 @@ protected String formatMetricName(String name) {
 
     @Override
     protected CamelContext createCamelContext() throws Exception {
+        meterRegistry = new SimpleMeterRegistry();
         CamelContext context = super.createCamelContext();
         MicrometerRoutePolicyFactory factory = 
createMicrometerRoutePolicyFactory();
+        factory.setCamelContext(context);

Review Comment:
   Hey guys, 
   Just want to let you know that when I updated from Camel 4.4 to 4.8 and the 
`MicrometerRoutePolicy` started failing to initialize because previously the 
`MicrometerRoutePolicyFactory` didn't require `camelContext` to be provided.
   
   Considering that `MicrometerRoutePolicyFactory` implements 
`CamelContextAware` and extends `ServiceSupport`, maybe it worth to do 
automatic wiring when the factory gets added to the Camel Context via 
`addRoutePolicyFactory`, or some other way.
   
   
   PS. Of course I'll fix it my code by providing the `camelContext` to it.



-- 
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-unsubscr...@camel.apache.org

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

Reply via email to