hachikuji commented on code in PR #12538:
URL: https://github.com/apache/kafka/pull/12538#discussion_r949676740


##########
core/src/test/java/kafka/testkit/KafkaClusterTestKit.java:
##########
@@ -275,15 +275,15 @@ metaProperties, config, new MetadataRecordSerde(), 
metadataPartition, KafkaRaftS
                     executorService.shutdownNow();
                     executorService.awaitTermination(5, TimeUnit.MINUTES);
                 }
-                for (ControllerServer controller : controllers.values()) {
-                    controller.shutdown();
-                }
                 for (BrokerServer brokerServer : brokers.values()) {
                     brokerServer.shutdown();
                 }
                 for (KafkaRaftManager<ApiMessageAndVersion> raftManager : 
raftManagers.values()) {
                     raftManager.shutdown();
                 }
+                for (ControllerServer controller : controllers.values()) {
+                    controller.shutdown();
+                }

Review Comment:
   I added a few comments to clarify. Really I think `KafkaClusterTestKit` 
should be using `KafkaRaftServer` directly instead of building the components 
directly. I've wanted to do this refactor for a while, but have not had time. 



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