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


##########
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:
   I'm aware that `withKip853Rpc` defines the versions of RPCs to send. The 
distinction I'm trying to make is `withKip853Rpc` does more than define what 
RPC versions to send in the test, it also defines what the local replica 
supports (for instance, if directory ids are supported) which can be different 
than what other replicas support. 
   
   resolved offline - 
https://github.com/apache/kafka/pull/16637#discussion_r1689134569



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