gnodet opened a new pull request, #24616: URL: https://github.com/apache/camel/pull/24616
## Summary Fix flaky `RawMailMessageTest` (12.4% failure rate in CI) caused by two race conditions: 1. **Wrong mailbox user in IMAP raw route**: The route for raw IMAP messages was consuming from `jonesImap` instead of `jonesRawImap`. This meant two routes (raw IMAP and normal IMAP) competed for the same single message in the `jonesImap` mailbox, both with `delete=true`. Whichever route polled first consumed and deleted the message, leaving the other route with an empty mailbox and a failing assertion. 2. **Premature `Mailbox.clearAll()` in `testGetRawJavaMailMessage`**: This call wiped all mailbox contents (including messages prepared by `setupResources()`) before the consumer routes for other tests had necessarily consumed their messages, causing intermittent failures depending on test execution order. ## Changes - Fixed the IMAP raw message route to consume from `jonesRawImap` (matching the POP3 raw route which correctly uses `jonesRawPop3`) - Removed the `Mailbox.clearAll()` call from `testGetRawJavaMailMessage` (cleanup is already handled by `cleanupResources()`) ## Test plan - [x] `mvn test -pl components/camel-mail -Dtest=RawMailMessageTest` — all 5 tests pass - [ ] CI build passes _Claude Code on behalf of gnodet_ -- 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]
