TestKafkaExtractionCluster: Shut down Kafka, ZK in @After. (#11963)

This commit is contained in:
Gian Merlino 2021-11-20 15:17:05 -08:00 committed by GitHub
parent 2e3767bef0
commit cb0a2af644
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 0 deletions

View File

@ -91,6 +91,9 @@ public class TestKafkaExtractionCluster
{
zkServer = new TestingCluster(1);
zkServer.start();
closer.register(() -> {
zkServer.stop();
});
kafkaServer = new KafkaServer(
getBrokerProperties(),
@ -99,6 +102,10 @@ public class TestKafkaExtractionCluster
false);
kafkaServer.startup();
closer.register(() -> {
kafkaServer.shutdown();
kafkaServer.awaitShutdown();
});
log.info("---------------------------Started Kafka Broker ---------------------------");
log.info("---------------------------Publish Messages to topic-----------------------");