apupier opened a new pull request, #30930: URL: https://github.com/apache/camel/pull/30930
Fixes https://issues.apache.org/jira/browse/CAMEL-27593 (flaky test introduced by CAMEL-27457 / #30813). ## Problem `AWS2S3StreamUploadStopStartTest.aStopThatFailsOnS3StopsTheTimeoutTask` failed on CI (~13% failures, ~21% flaky): ``` the stop ends the timeout task ==> expected: <[]> but was: <[Thread[... S3_Streaming_Upload_Timeout_Checker,5,main]]> ``` The test asserted right after `producer.stop()` that no `S3_Streaming_Upload_Timeout_Checker` thread is alive. The stop only asks the executor to shut down, and its thread can stay alive a short while afterwards, so the assertion races with the thread termination on a loaded machine. The production code stops the task correctly. ## Fix Test only: wait for the thread to end with Awaitility and an explicit `atMost` (as the test already does after the failed stop), and use the same 10 seconds timeout for both waits. ## Verification The test method repeated (temporarily, not committed) while 30 busy-loop processes loaded the CPUs: - without the fix: 300 repetitions, 1 failure (run 69) with the exact message above - with the fix: 600 repetitions, 0 failures --- _Claude Code-style AI assistance: this PR was prepared by IBM Bob 2.2.1 on behalf of apupier._ -- 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]
