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


##########
server/src/test/java/org/apache/kafka/server/BootstrapControllersIntegrationTest.java:
##########
@@ -205,6 +208,51 @@ private void testDescribeMetadataQuorum(ClusterInstance 
clusterInstance, boolean
         }
     }
 
+    @ClusterTest(controllers = 3, standalone = true)
+    public void testAddRemoveRaftVoterByControllers(ClusterInstance 
clusterInstance) throws Exception {
+        testAddRemoveRaftVoter(clusterInstance, true);
+    }
+
+    @ClusterTest(controllers = 3, standalone = true)
+    public void testAddRemoveRaftVoter(ClusterInstance clusterInstance) throws 
Exception {
+        testAddRemoveRaftVoter(clusterInstance, false);
+    }
+
+    private void testAddRemoveRaftVoter(ClusterInstance clusterInstance, 
boolean usingBootstrapControllers) throws Exception {
+        try (Admin admin = Admin.create(adminConfig(clusterInstance, 
usingBootstrapControllers))) {
+            Set<Integer> initialVoters = 
voterIds(admin.describeMetadataQuorum().quorumInfo().get());
+            AtomicInteger voterId = new AtomicInteger();
+            TestUtils.retryOnExceptionWithTimeout(30_000, () -> {
+                QuorumInfo quorumInfo = 
admin.describeMetadataQuorum().quorumInfo().get();
+                voterId.set(quorumInfo.observers().stream()

Review Comment:
   Oh I see, we make it `standalone`, but do not have auto-join on.
   



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