[
https://issues.apache.org/jira/browse/CAMEL-24029?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18123345#comment-18123345
]
Guillaume Nodet commented on CAMEL-24029:
-----------------------------------------
Fixed via https://github.com/apache/camel/pull/27376
Root cause: The route used .delay(100) so with SEDA's default single consumer,
messages are processed sequentially. On fast CI machines, all 5 messages could
complete in ~500ms (well inside the 1-second stopRoute window), causing
stopRoute to return true (clean stop) when the test expected false (abort
triggered).
Fix: increased the delay from 100ms to 2000ms. With a 2-second delay and SEDA's
single consumer, the inflight exchange is guaranteed to still be active when
the 1-second timeout fires, so stopRoute reliably returns false and aborts.
Both tests pass: Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 6.556 s
_Note: This comment was generated by an AI coding agent._
> Fix flaky camel-core tests using timed assertions
> -------------------------------------------------
>
> Key: CAMEL-24029
> URL: https://issues.apache.org/jira/browse/CAMEL-24029
> Project: Camel
> Issue Type: Test
> Components: camel-core
> Reporter: Guillaume Nodet
> Assignee: Guillaume Nodet
> Priority: Major
> Fix For: 4.22.0
>
>
> Several camel-core tests are flaky on CI due to missing explicit timeouts on
> MockEndpoint assertions:
> - StopRouteAbortAfterTimeoutTest (3 flaky, 1 failed)
> - LoopNoBreakOnShutdownTest (7 flaky)
> - DefaultCamelContextSuspendResumeRouteTest (5 flaky)
> _Claude Code on behalf of gnodet_
--
This message was sent by Atlassian Jira
(v8.20.10#820010)