apupier opened a new pull request, #29732:
URL: https://github.com/apache/camel/pull/29732
## Description
Fixes the flaky `MailFetchSizeTest.testFetchSize`:
```
org.awaitility.core.ConditionTimeoutException: Assertion condition defined
as a Lambda expression in org.apache.camel.component.mail.MailFetchSizeTest
null within 500 milliseconds.
at
org.apache.camel.component.mail.MailFetchSizeTest.testFetchSize(MailFetchSizeTest.java:59)
```
The test waits for the mailbox message count to drop using
`Awaitility.await().atMost(500, MILLISECONDS)` once the mock endpoint is
satisfied. The mock is satisfied as soon as the exchanges reach `mock:result`,
but the messages are only flagged `DELETED` afterwards in
`MailConsumer.processCommit` and actually removed when the folder is closed at
the end of the poll. On a slow machine this takes more than 500ms.
Reproduced locally by adding a 600ms delay after `mock:result` in a copy of
the test: `expected: <3> but was: <5> within 500 milliseconds`.
Both Awaitility timeouts are raised to 10 seconds. Awaitility returns as
soon as the condition holds, so the passing test is not slower.
Test-only change, so no JIRA issue was filed.
## Target
- [x] I checked that the commit is targeting the correct branch (Camel 4
uses the `main` branch)
## Tracking
- [ ] 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.
- [ ] I have run `mvn clean install -DskipTests` locally from root folder
and I have committed all auto-generated changes.
---
_AI-generated 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]