majialoong opened a new pull request, #22632: URL: https://github.com/apache/kafka/pull/22632
The test had a race condition. It released `latchTask1` inside the mocked `offsetBackingStore.get()`, but at that point the worker thread may not have returned from `offsetBackingStore.get()` yet. As a result, the test thread could resume and run the verification before `OffsetStorageReaderImpl` had reached `offsetReadFuture.get()`, causing the test to fail intermittently. This fix moves the latch release to the mocked `hangingFuture.get()`, so the test only continues after the worker is actually blocked while waiting on the future. -- 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]
