hachikuji commented on code in PR #12538: URL: https://github.com/apache/kafka/pull/12538#discussion_r949654185
########## 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 was trying to make the order consistent with `KafkaRaftServer`. The circular dependence between `RaftManager` and `ControllerServer` makes this a bit awkward in any case. `RaftManager` needs the `SocketServer` from `ControllerServer`. On the other hand, `ControllerServer` needs to register a listener with `RaftManager`. Perhaps we need to pull `SocketServer` up to a higher level? But that would be a major effort. -- 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