gnodet opened a new pull request, #27376: URL: https://github.com/apache/camel/pull/27376
## Summary Fixes the remaining flaky test in `StopRouteAbortAfterTimeoutTest.testStopRouteWithAbortAfterTimeoutTrue()` that was not addressed by PR #24630. ## Root Cause The route used `.delay(100)` so with SEDA's default single consumer, messages are processed sequentially at ~100ms each. With 5 messages queued, all could complete in ~500ms — well within the 1-second `stopRoute` timeout. On fast CI machines this caused `stopRoute` to return `true` (clean stop), but the test expects `false` (abort triggered because inflight exchanges exist when the timeout fires). PR #24630 fixed the secondary `MockEndpoint.assertIsSatisfied()` timeout (line 57) but left the primary race at line 48 (`assertFalse(stopRouteResponse)`) unfixed. ## Fix Increase the route delay from `100ms` to `2000ms`. With SEDA's single default consumer, only one message is inflight at a time. A 2-second delay guarantees that the 1-second `stopRoute` timeout always expires while that exchange is still being processed, so `stopRoute` reliably returns `false` and aborts. The second test (`testStopRouteWithAbortAfterTimeoutFalse`) is unaffected: it uses `abortAfterTimeout=false`, so it waits for the single inflight exchange to complete (~2s), well within the 3-second shutdown strategy timeout. ## Testing Both tests pass locally: ``` Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 6.556 s ``` Fixes https://issues.apache.org/jira/browse/CAMEL-24029 -- 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]
