kevin-wu24 opened a new pull request, #23283:
URL: https://github.com/apache/kafka/pull/23283

   ## What Changed
   
   ### KRaftClusterTest#testDescribeQuorumRequestToControllers: 
   
   the test forces a leader change and asserts the new leader differs, but it 
observed the change with a single in-flight `DescribeQuorum` request that races 
with the old leader's resignation.
   
   Shut the old leader down fully first, then poll `describeMetadataQuorum` 
until a surviving controller reports itself as the new leader. Because the old 
leader is gone, no successful response can name it, so the assertion is now 
deterministic; polling also lets the admin client retry through the 
`NOT_LEADER_OR_FOLLOWER` errors and re-resolve the active controller.
   
   ### KafkaRaftClientTest#testCannotResignIfObserver: 
   
   `leaderId` and `otherNodeId` were drawn from two `randomReplicaId()` calls, 
so the test's voter ids can collide and throw a `IllegalArgumentException`. 
Other unit tests in the `raft` module only call `randomReplicaId()` once so do 
not run into this.
   


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