gnodet commented on code in PR #23180:
URL: https://github.com/apache/camel/pull/23180#discussion_r3233048111
##########
core/camel-core/src/test/java/org/apache/camel/impl/DefaultCamelContextSuspendResumeRouteTest.java:
##########
@@ -49,15 +49,9 @@ public void testSuspendResume() throws Exception {
context.suspend();
- // even though we wait for the route to suspend, there is a race
condition where the consumer
- // may still process messages while it's being suspended due to
asynchronous message handling.
- // as a result, we need to wait a bit longer to ensure that the seda
consumer is suspended before
- // sending the next message.
- Thread.sleep(1000L);
Review Comment:
Fixed in ef247030 — now split into two `await()` calls: first checks
`context.isSuspended()`, then uses `pollDelay(1s)` to give the seda consumer
thread time to complete its poll cycle before sending the test message.
_Claude Code on behalf of Guillaume Nodet_
--
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]