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


##########
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:
   this test has not been reported flaky by develocity 
https://develocity.apache.org/scans/tests?search.rootProjectNames=camel&search.timeZoneId=Europe%2FParis&tests.container=org.apache.camel.component.direct.DirectProducerBlockingTest&tests.test=testProducerBlocksWithNoConsumers



##########
core/camel-core/src/test/java/org/apache/camel/component/direct/DirectProducerBlockingTest.java:
##########
@@ -101,7 +108,7 @@ public void run() {
         // This call will block until the route is resumed by the background 
thread
         template.sendBody("direct:suspended?block=true&timeout=2000", "hello 
world");
 
-        assertMockEndpointsSatisfied();
+        MockEndpoint.assertIsSatisfied(context, 30, TimeUnit.SECONDS);

Review Comment:
   this won't change anything as the flakiness is reported on the previous line 
of code



##########
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:
   please use a specifc routeId for the test so that it cannot cause bad 
interactions with other tests



-- 
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