mirror of https://github.com/apache/kafka.git
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:
parent
81c24d6bf8
commit
150a78ab90
|
|
@ -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))
|
||||
})
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue