cmccabe commented on a change in pull request #11606: URL: https://github.com/apache/kafka/pull/11606#discussion_r787027731
########## File path: core/src/test/scala/unit/kafka/integration/KafkaServerTestHarness.scala ########## @@ -253,4 +248,32 @@ abstract class KafkaServerTestHarness extends QuorumTestHarness { getController().kafkaController.controllerContext.topicNames.toMap } + private def createBrokers(startup: Boolean): Unit = { + // Add each broker to `servers` buffer as soon as it is created to ensure that brokers + // are shutdown cleanly in tearDown even if a subsequent broker fails to start + for (config <- configs) { + val broker = createBrokerFromConfig(config) + _brokers += broker + if (startup) { + broker.startup() Review comment: It seems simple to just set the boolean right after creating the broker. Why not do that? I agree this is a pre-existing problem, but that's not a reason to propagate it. -- 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