gnodet opened a new pull request, #25201:
URL: https://github.com/apache/camel/pull/25201

   _Claude Code on behalf of gnodet_
   
   ## Summary
   
   Fix the flaky `XsltFromFileExceptionTest` by reordering the wait and 
assertion calls. The test was failing intermittently in CI (6/254 runs in July 
2026 per Develocity) due to a race condition.
   
   ## Root Cause
   
   The test called `assertMockEndpointsSatisfied()` **before** 
`oneExchangeDone.matchesWaitTime()`. For mock endpoints expecting zero messages 
(`expectedMessageCount(0)`), `MockEndpoint.doAssertIsSatisfied()` returns 
**immediately** without any waiting — it simply checks that no messages have 
arrived at that instant. Under CI load, the file consumer may not have picked 
up and processed the file within the default 10-second mock wait time, causing 
sporadic failures.
   
   ## Fix
   
   Swap the call order in both test methods:
   1. **First**: `oneExchangeDone.matchesWaitTime()` — wait for the exchange to 
fully complete
   2. **Then**: `assertMockEndpointsSatisfied()` — verify mock expectations 
(now a simple state check)
   
   This ensures the file consumer has finished processing before any mock 
assertions are evaluated, eliminating the race condition.
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)


-- 
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]

Reply via email to