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

   ## Summary
   
   Stabilize the flaky `MulticastParallelStreamingTimeoutTest` in `camel-core`.
   
   The test `testMulticastParallelStreamingTimeout` was failing intermittently 
on JDK 17 in CI due to two issues:
   
   1. **Exact ordering assertion** — The test asserted 
`mock.expectedBodiesReceived("CB")`, which assumes C (no delay) always 
completes before B (500ms delay) in the parallel streaming multicast. Under 
heavy CI load, thread scheduling can make B's result arrive at the aggregation 
strategy before C's, flipping the order to "BC" and causing the assertion to 
fail.
   
   2. **Missing `@Isolated` annotation** — Related tests 
(`MulticastParallelTimeoutTest`, `MulticastParallelStreamingTwoTimeoutTest`) 
use `@Isolated` to prevent interference from parallel test execution.
   
   ### Changes
   
   - **Order-independent assertions**: Replaced 
`mock.expectedBodiesReceived("CB")` with content-based checks that verify the 
result contains B and C but not A, regardless of order (consistent with the 
approach used in `MulticastParallelTimeoutTest`)
   - **Awaitility**: Replaced `mock.setResultWaitTime(20000)` + 
`assertMockEndpointsSatisfied()` with `await().atMost(20, 
TimeUnit.SECONDS).untilAsserted(...)` per project guidelines
   - **`@Isolated` annotation**: Added to prevent flakiness from parallel test 
execution (matches sibling test classes)
   
   ## Test plan
   
   - [x] `MulticastParallelStreamingTimeoutTest` passes locally
   - [x] Code formatted with `mvn formatter:format impsort:sort`
   - [ ] CI build passes
   
   _Claude Code on behalf of Guillaume Nodet_
   
   🤖 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