DL1231 commented on code in PR #13950:
URL: https://github.com/apache/kafka/pull/13950#discussion_r1251392856
##########
core/src/test/scala/integration/kafka/admin/TopicCommandIntegrationTest.scala:
##########
@@ -789,9 +756,9 @@ class TopicCommandIntegrationTest extends
KafkaServerTestHarness with Logging wi
}
val output = TestUtils.grabConsoleOutput(
topicService.describeTopic(new
TopicCommandOptions(Array("--under-min-isr-partitions"))))
- val rows = output.split("\n")
- assertTrue(rows(0).startsWith(s"\tTopic: $underMinIsrTopic"))
- assertTrue(rows(1).startsWith(s"\tTopic: $offlineTopic"))
+ val rows = output.split(System.lineSeparator())
+ assertTrue(rows(0).startsWith(s"\tTopic: $underMinIsrTopic"),
s"Unexpected output: ${rows(0)}")
+ assertTrue(rows(1).startsWith(s"\tTopic: $offlineTopic"), s"Unexpected
output: ${rows(0)}")
Review Comment:
Done.
##########
core/src/test/scala/integration/kafka/admin/TopicCommandIntegrationTest.scala:
##########
@@ -845,24 +812,19 @@ class TopicCommandIntegrationTest extends
KafkaServerTestHarness with Logging wi
Set(new TopicPartition(testTopicName, 0)).asJava
)
- adminClient.createTopics(
- Collections.singletonList(new NewTopic(testTopicName, 1, 1.toShort))
- ).all().get()
- waitForTopicCreated(testTopicName)
+ TestUtils.createTopicWithAdmin(adminClient, testTopicName, brokers, 1, 1)
val output = TestUtils.grabConsoleOutput(
topicService.describeTopic(new TopicCommandOptions(Array("--topic",
testTopicName))))
- val rows = output.split("\n")
+ val rows = output.split(System.lineSeparator())
assertEquals(2, rows.size)
Review Comment:
Done.
--
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]