gnodet opened a new pull request, #24418: URL: https://github.com/apache/camel/pull/24418
## Summary Fixes flaky `LRAFailuresIT.testCompletionAfterFailures` (and `testCompensationAfterFailures`) in the `camel-lra` module. **Root cause:** Both tests used `MockEndpoint.setResultWaitTime(20000)` + `assertIsSatisfied()`, which performs a single check at the deadline. Since LRA saga completion/compensation callbacks are asynchronous (HTTP retries via the LRA coordinator), this pattern is timing-sensitive and fails intermittently on JDK 17. **Fix:** Replace with Awaitility's `await().atMost(20, SECONDS).untilAsserted(...)` pattern, which polls every 100ms. This makes the tests: - **More reliable**: repeatedly checks until satisfied, rather than a single check - **Faster**: passes as soon as the condition is met, not after the full wait - **Consistent**: follows the same pattern used by other LRA integration tests (e.g., `LRACreditIT`) ## Changes - `LRAFailuresIT.java`: Replaced `setResultWaitTime()` + `assertIsSatisfied()` with Awaitility in both test methods ## Test plan - [x] Module builds successfully (`mvn -DskipTests install`) - [x] Unit tests pass (21/21) - [ ] Integration tests pass in CI (require LRA coordinator container) _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]
