gnodet commented on code in PR #24698:
URL: https://github.com/apache/camel/pull/24698#discussion_r3590264032


##########
components/camel-jms/src/test/java/org/apache/camel/component/jms/integration/JmsAddAndRemoveRouteManagementIT.java:
##########
@@ -139,7 +139,7 @@ protected RouteBuilder createRouteBuilder() {
         return new RouteBuilder() {
             @Override
             public void configure() {
-                
from("activemq:queue:JmsAddAndRemoveRouteManagementTest.foo").to("mock:result");
+                
from("activemq:queue:JmsAddAndRemoveRouteManagementTest.foo").routeId("fooConsumer").to("mock:result");

Review Comment:
   _Claude Code on behalf of gnodet_
   
   Good point — renamed to `"addRemoveRouteManagement-foo"` to be test-specific 
and avoid potential collisions with other tests. Updated the 
`waitForJmsConsumerRoutes` call to match.
   
   Fixed in 095e9c3.



##########
core/camel-core/src/test/java/org/apache/camel/component/direct/DirectProducerBlockingTest.java:
##########
@@ -68,7 +72,10 @@ public void testProducerBlocksWithNoConsumers() throws 
Exception {
                 = 
assertIsInstanceOf(DirectConsumerNotAvailableException.class, e.getCause());
         assertIsInstanceOf(CamelExchangeException.class, cause);
 
-        assertTrue(watch.taken() > 490);
+        // Use a relaxed lower bound — on slow CI with GC pauses or thread
+        // scheduling delays, the measured blocking time can fall slightly
+        // below the configured 500ms timeout
+        assertTrue(watch.taken() > 400, "Should have blocked for at least 
400ms but was " + watch.taken());

Review Comment:
   _Claude Code on behalf of gnodet_
   
   You're right — Develocity confirms only `testProducerBlocksResumeTest` is 
flaky (4 of 334 runs, 1.2%). Neither `testProducerBlocksWithNoConsumers` nor 
`testProducerBlocksForSuspendedConsumer` have any flaky occurrences. I've 
reverted the changes to both non-flaky methods.
   
   Fixed in 095e9c3.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to