Minor: properly close KafkaCheckpointManager in TestKafkaCheckpointManager
authorCameron Lee <calee@linkedin.com>
Wed, 12 Dec 2018 21:42:48 +0000 (13:42 -0800)
committerPrateek Maheshwari <pmaheshwari@apache.org>
Wed, 12 Dec 2018 21:42:48 +0000 (13:42 -0800)
Higher versions of KafkaServerTestHarness will validate that certain threads are no longer alive when the test class exits. Eventually, when kafka is upgraded, that validation would fail.

Author: Cameron Lee <calee@linkedin.com>

Reviewers: Prateek Maheshwari <pmaheshwari@apache.org>

Closes #856 from cameronlee314/kcm_test

samza-kafka/src/test/scala/org/apache/samza/checkpoint/kafka/TestKafkaCheckpointManager.scala

index 5abbea9..0a0aae8 100644 (file)
@@ -233,6 +233,7 @@ class TestKafkaCheckpointManager extends KafkaServerTestHarness {
     kcm.register(taskName)
     kcm.start
     kcm.writeCheckpoint(taskName, checkpoint)
+    kcm.stop
   }
 
   private def createTopic(cpTopic: String, partNum: Int, props: Properties) = {