gnodet opened a new pull request, #24411: URL: https://github.com/apache/camel/pull/24411
## Summary - Replace flaky `CountDownLatch`-based synchronization with Awaitility `await().untilAsserted()` in JPA consumer tests (`JpaWithNamedQueryTest`, `JpaTest`, `JpaWithNamedQueryAndParametersTest`) - Re-enable 3 tests previously disabled on CI (`JpaWithQueryTest`, `JpaWithNativeQueryTest`, `JpaWithNativeQueryWithResultClassTest`) by removing `@DisabledIfSystemProperty` annotations — the underlying timing issue in their parent class is now fixed - Mark `receivedExchange` fields as `volatile` for correct cross-thread visibility **Root cause:** The `CountDownLatch` + `latch.await(timeout)` pattern in consumer tests was timing-sensitive. The JPA consumer uses scheduled polling (1s initial delay, 500ms interval), and under CI load the consumer poll could arrive after the fixed deadline, causing hangs or assertion failures. Awaitility's polling approach retries the assertion until it passes, making the tests resilient to scheduling jitter. ## Test plan - [x] All 96 camel-jpa tests pass locally (including the 3 re-enabled tests) - [x] No `Thread.sleep` or `CountDownLatch` remaining in modified test files - [x] Code formatted with `mvn formatter:format impsort:sort` _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]
