gnodet opened a new pull request, #24422: URL: https://github.com/apache/camel/pull/24422
## Summary - Replace `Phaser`-based synchronization with a simpler `CountDownLatch` and use Awaitility for the mock endpoint assertion - The `Phaser` approach was timing-sensitive under JDK 25's thread scheduling, causing `testSendingMessageGetsDelayed` to fail intermittently - The new approach uses a latch to signal when the short-delay route starts processing and increases the long delay to 5000ms to ensure context shutdown always interrupts it before completion ## What changed The original test used a `Phaser(2)` to synchronize both SEDA routes before they entered their delay phases, then immediately called `assertMockEndpointsSatisfied()`. On JDK 25, different thread scheduling could cause the short-delay message (1ms) to not have arrived at `mock:result` by the time of assertion. The fix: 1. **Replaces `Phaser` with `CountDownLatch`** — simpler synchronization; the latch signals when the short-delay route begins processing 2. **Uses `Awaitility.await()`** — replaces the direct `assertMockEndpointsSatisfied()` call with `await().atMost(5, SECONDS).untilAsserted(...)`, making the assertion resilient to scheduling variations 3. **Increases long delay to 5000ms** — provides a much wider timing margin to ensure the context shutdown always interrupts the long-delay route ## Test plan - [x] `DelayerWhileShutdownTest` passes consistently (verified 4+ consecutive runs) - [ ] CI passes _Claude Code on behalf of [@oscerd](https://github.com/oscerd)_ -- 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]
