cmccabe commented on a change in pull request #11606:
URL: https://github.com/apache/kafka/pull/11606#discussion_r781651142
##########
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 like we should be setting the `alive` boolean to true here,
rather than later on, right? Otherwise this might get out of sync if we get an
exception later 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]