mynameborat 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_r377860882
##########
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:
Did any of your change force to separate out the tests or is it more of a
clean up?
----------------------------------------------------------------
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