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


##########
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:
   _Claude Code on behalf of gnodet_
   
   You're right — the flakiness is on `template.sendBody(timeout=2000)` timing 
out, not on the mock assertion. The background thread's `await().atMost(2s)` + 
`resumeRoute()` occasionally exceeds the 2s sendBody timeout under CI load.
   
   I've replaced the mock assertion change with the actual fix:
   - Increased `sendBody` timeout from `2000` → `10000` ms (the real bottleneck)
   - Increased the background thread's Awaitility `atMost` from `2s` → `10s` 
(so it has enough headroom to detect TIMED_WAITING)
   - Reverted `assertMockEndpointsSatisfied()` back to the original (it's fine 
as-is)
   
   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