gnodet opened a new pull request, #24416: URL: https://github.com/apache/camel/pull/24416
## Summary Fixes the flaky test `LogWriterRollOverUpdateAsyncWithContentionTest.testReadWriteUpdateRecordsWithRollOver` in camel-wal. **Root cause:** `runTest()` only waited for the generate task to complete (via a `CountDownLatch`) before reading the log file and asserting all entries were in `PROCESSED` state. The update task — which marks records as committed — could still be running, causing assertions to fail on entries still in `NEW` state. This was especially pronounced with larger queue capacities (3000, 4000) where the producer finishes quickly while the consumer is still draining the queue. **Fix:** - Replace the insufficient latch-based synchronization with **Awaitility** to wait for both the generate and update tasks to complete via `ExecutorService` termination - Flush the `LogWriter` before reading to ensure all data is persisted to disk before verification - Remove the now-unused `CountDownLatch` field and `latch.countDown()` calls from both subclass tests ## Test plan - [x] `LogWriterRollOverUpdateAsyncWithContentionTest` passes all 8 parameterized cases - [x] Ran the flaky test 6 times (48 total cases) with 0 failures - [x] `LogWriterRollOverUpdateAsyncTest` (sibling test) passes without regression - [x] Full camel-wal test suite passes (23 tests, 0 failures) _Claude Code on behalf of Guillaume Nodet_ 🤖 Generated with [Claude Code](https://claude.ai/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]
