hudeqi commented on code in PR #13959: URL: https://github.com/apache/kafka/pull/13959#discussion_r1257667783
########## core/src/test/scala/unit/kafka/server/ServerShutdownTest.scala: ########## @@ -297,15 +297,20 @@ class ServerShutdownTest extends KafkaServerTestHarness { // Shutdown controller. Request timeout is 30s, verify that shutdown completed well before that val shutdownFuture = executor.submit(new Runnable { - override def run(): Unit = controllerChannelManager.shutdown() + override def run(): Unit = { + controllerChannelManager.shutdown() + controllerChannelManager.removeMetrics() + } }) shutdownFuture.get(10, TimeUnit.SECONDS) } finally { if (serverSocket != null) serverSocket.close() - if (controllerChannelManager != null) + if (controllerChannelManager != null) { controllerChannelManager.shutdown() Review Comment: I've put it all together. -- 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