ahuang98 commented on code in PR #16637:
URL: https://github.com/apache/kafka/pull/16637#discussion_r1687028425


##########
raft/src/test/java/org/apache/kafka/raft/KafkaRaftClientTest.java:
##########
@@ -2763,78 +2765,396 @@ public void testDescribeQuorumNonLeader(boolean 
withKip853Rpc) throws Exception
     }
 
     @ParameterizedTest
-    @ValueSource(booleans = { true, false })
-    public void testDescribeQuorum(boolean withKip853Rpc) throws Exception {
-        int localId = randomReplicaId();
-        ReplicaKey closeFollower = replicaKey(localId + 2, withKip853Rpc);
-        ReplicaKey laggingFollower = replicaKey(localId + 1, withKip853Rpc);
-        Set<Integer> voters = Utils.mkSet(localId, closeFollower.id(), 
laggingFollower.id());
+    @CsvSource({ "true,0", "true,1", "false,0", "false,1" })
+    public void testDescribeQuorumOld(boolean withKip853Rpc, short apiVersion) 
throws Exception {
+        int localId = 0;
+        ReplicaKey local = replicaKey(localId, withKip853Rpc);
+        ReplicaKey follower1 = replicaKey(1, withKip853Rpc);
+        Set<Integer> voters = Utils.mkSet(localId, follower1.id());
+        VoterSet voterSet = VoterSetTest.voterSet(Stream.of(local, follower1));
+
+        RaftClientTestContext.Builder builder = new 
RaftClientTestContext.Builder(localId, 
local.directoryId().orElse(ReplicaKey.NO_DIRECTORY_ID))
+            .withStaticVoters(voters)
+            .withKip853Rpc(true);

Review Comment:
   `true` is a typo, thanks for catching that
   
   I want this test to check the local leader is able to handle older versions 
of describe quorum requests (versions 0 and 1) no matter if it supports 
kip853Rpc or not 



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