apupier opened a new pull request, #31018: URL: https://github.com/apache/camel/pull/31018
# Description Fix flaky `FileConsumerQuartzSchedulerStartSchedulerTest.testStartSchedulerFalseMustNotPoll` ([CAMEL-27553](https://issues.apache.org/jira/browse/CAMEL-27553), flaky ~8% of the time on Develocity). ## Cause The test asserted that no message is received with `await().during(3, SECONDS).atMost(4, SECONDS)`. The `during` period must be fully elapsed within the `atMost` timeout, leaving only about one second of slack for everything else. On a loaded CI machine, a delay of about a second or more before or during the first evaluation of the condition makes Awaitility fail with `ConditionTimeoutException ... within 4 seconds`, even though nothing was polled. I reproduced this locally with a temporary copy of the original check and a 1.5 second delay added to its first evaluation: it failed with the same `ConditionTimeoutException` as in CI. Without the delay it passed. ## Fix Use `MockEndpoint.setAssertPeriod(3000)` with `assertIsSatisfied()`: the mock asserts that no message was received, waits 3 seconds (longer than the 2 second cron interval) and asserts again. There is no outer timeout that can expire any more. # Target - [x] I checked that the commit is targeting the correct branch (Camel 4 uses the `main` branch) # Tracking - [x] If this is a large change, bug fix, or code improvement, I checked there is a [JIRA issue](https://issues.apache.org/jira/browse/CAMEL) filed for the change (usually before you start working on it). # Apache Camel coding standards and style - [x] I checked that each commit in the pull request has a meaningful subject line and body. - [x] I have run `mvn clean install -DskipTests` locally from root folder and I have committed all auto-generated changes. --- _Claude Code-style attribution: AI-generated by IBM Bob 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]
