KAFKA-15897 fix kafka.server.ControllerRegistrationManagerTest#testWrongIncarnationId (#15828)

ControllerRegistrationManagerTest is flaky due to the poll in L221. The potential root cause is a race condition between the first poll (L221) and the second poll (L229). Before the second poll, we mock a response (L226), which should be processed by the second poll. However, if the first poll take this away, the second poll would get nothing, and this could lead to an error.

Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
This commit is contained in:
Johnny Hsu 2024-04-30 07:55:12 +08:00 committed by GitHub
parent 81c24d6bf8
commit 150a78ab90
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 0 additions and 1 deletions

View File

@ -218,7 +218,6 @@ class ControllerRegistrationManagerTest {
r => Some(r.setIncarnationId(new Uuid(456, r.controllerId()))))
manager.start(context.mockChannelManager)
TestUtils.retryOnExceptionWithTimeout(30000, () => {
context.mockChannelManager.poll()
assertEquals((true, 0, 0), rpcStats(manager))
})