kevin-wu24 commented on code in PR #19982:
URL: https://github.com/apache/kafka/pull/19982#discussion_r2198329004


##########
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:
   Are you okay with leaving this in? The `completeApiVersionsForAddVoter` 
method is a more general method than `commitNewVoterSetForAddVoter`, since it 
does not have metrics checks on the number of voters/observers. This means 
future tests that want to test AddRaftVoter RPC can call 
`completeApiVersionsForAddVoter` as is.



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

Reply via email to