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


##########
raft/src/test/java/org/apache/kafka/raft/KafkaRaftClientTest.java:
##########
@@ -3256,24 +3268,25 @@ public void 
testDescribeQuorumWithOnlyStaticVoters(boolean withKip853Rpc) throws
     }
 
     @ParameterizedTest
-    @CsvSource({ "true, true", "true, false", "false, false" })
-    public void testDescribeQuorumWithFollowers(boolean withKip853Rpc, boolean 
withBootstrapSnapshot) throws Exception {
+    @MethodSource("generateTestDescribeQuorumMatrix")
+    public void testDescribeQuorumWithFollowers(RaftProtocol raftProtocol, 
boolean withBootstrapSnapshot) throws Exception {
         int localId = randomReplicaId();
         int followerId1 = localId + 1;
         int followerId2 = localId + 2;
+        boolean reconfigSupported = raftProtocol.isReconfigSupported();
         ReplicaKey local = replicaKey(localId, withBootstrapSnapshot);
         // local directory id must exist
         Uuid localDirectoryId = local.directoryId().orElse(Uuid.randomUuid());
         ReplicaKey bootstrapFollower1 = replicaKey(followerId1, 
withBootstrapSnapshot);
         // if withBootstrapSnapshot is false, directory ids are still needed 
by the static voter set
-        Uuid followerDirectoryId1 = 
bootstrapFollower1.directoryId().orElse(withKip853Rpc ? Uuid.randomUuid() : 
ReplicaKey.NO_DIRECTORY_ID);
+        Uuid followerDirectoryId1 = 
bootstrapFollower1.directoryId().orElse(reconfigSupported ? Uuid.randomUuid() : 
ReplicaKey.NO_DIRECTORY_ID);
         ReplicaKey follower1 = ReplicaKey.of(followerId1, 
followerDirectoryId1);
         ReplicaKey bootstrapFollower2 = replicaKey(followerId2, 
withBootstrapSnapshot);
-        Uuid followerDirectoryId2 = 
bootstrapFollower2.directoryId().orElse(withKip853Rpc ? Uuid.randomUuid() : 
ReplicaKey.NO_DIRECTORY_ID);
+        Uuid followerDirectoryId2 = 
bootstrapFollower2.directoryId().orElse(reconfigSupported ? Uuid.randomUuid() : 
ReplicaKey.NO_DIRECTORY_ID);
         ReplicaKey follower2 = ReplicaKey.of(followerId2, 
followerDirectoryId2);
 
-        RaftClientTestContext.Builder builder = new 
RaftClientTestContext.Builder(localId, localDirectoryId)
-            .withKip853Rpc(withKip853Rpc);
+        Builder builder = new Builder(localId, localDirectoryId)

Review Comment:
   Just to reduce verbosity? My preference is fully qualifying the Builder 
class given that it's an inner class with a pretty generic name but I'm 
honestly not sure which is better coding practice 



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