majialoong opened a new pull request, #22303:
URL: https://github.com/apache/kafka/pull/22303

   `LeaderElectionCommand` success only indicates the `controller` has written 
the metadata change, but brokers may not have synced the corresponding update 
yet. 
   
   The previous helper `fetchOrWaitForLeader` only waited for any leader (not 
the expected one), so assertions could still observe stale leader state and 
become flaky. 
   
   This change adds `fetchOrWaitForExpectedLeader` to poll until the expected 
leader is observed, eliminating the race in the test path.


-- 
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]

Reply via email to