ahuang98 commented on code in PR #19982: URL: https://github.com/apache/kafka/pull/19982#discussion_r2198308763
########## raft/src/test/java/org/apache/kafka/raft/KafkaRaftClientReconfigTest.java: ########## @@ -339,27 +340,80 @@ public void testAddVoter() throws Exception { Map.of(context.channel.listenerName(), newAddress) ); - // Show that the new voter is not currently a voter - assertFalse(context.client.quorum().isVoter(newVoter)); + prepareLeaderToReceiveAddVoter(context, epoch, local, follower, newVoter); - // Establish a HWM and fence previous leaders - context.deliverRequest( - context.fetchRequest(epoch, follower, context.log.endOffset().offset(), epoch, 0) - ); + // Attempt to add new voter to the quorum + context.deliverRequest(context.addVoterRequest(Integer.MAX_VALUE, newVoter, newListeners)); + + completeApiVersionsForAddVoter(context, newVoter, newAddress); Review Comment: this is only called in two places, I wonder if we should just remove the helper so folks can see very clearly what is happening in these tests -- 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: jira-unsubscr...@kafka.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org