cameronlee314 commented on a change in pull request #1263: SAMZA-2448: [Scala 
cleanup] Clean up and convert some parts of samza-kafka to java
URL: https://github.com/apache/samza/pull/1263#discussion_r377946826
 
 

 ##########
 File path: 
samza-kafka/src/test/scala/org/apache/samza/checkpoint/kafka/TestKafkaCheckpointManager.scala
 ##########
 @@ -159,29 +159,31 @@ class TestKafkaCheckpointManager extends 
KafkaServerTestHarness {
   def testFailOnTopicValidation(): Unit = {
     // By default, should fail if there is a topic validation error
     val checkpointTopic = "eight-partition-topic";
-    val kcm1 = createKafkaCheckpointManager(checkpointTopic)
-    kcm1.register(taskName)
+    val kcm = createKafkaCheckpointManager(checkpointTopic)
+    kcm.register(taskName)
     // create topic with the wrong number of partitions
     createTopic(checkpointTopic, 8, new 
KafkaConfig(config).getCheckpointTopicProperties())
     try {
-      kcm1.createResources
-      kcm1.start
+      kcm.createResources()
+      kcm.start()
       fail("Expected an exception for invalid number of partitions in the 
checkpoint topic.")
     } catch {
       case e: StreamValidationException => None
     }
-    kcm1.stop
+    kcm.stop()
+  }
 
-    // Should not fail if failOnTopicValidation = false
+  @Test
+  def testNoFailOnTopicValidationDisabled(): Unit = {
 
 Review comment:
   If I recall correctly, it was more of a clean-up in order to isolate the two 
tests, since this class still uses real Kafka/Zookeeper. I was also running 
into transient issues with the test not executing in the IDE, and this seemed 
to help with those issues (although I don't think having a single test was 
really the problem).

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to