You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by GitBox <gi...@apache.org> on 2022/04/28 08:53:33 UTC
[GitHub] [kafka] vamossagar12 commented on a diff in pull request #12104: KAFKA-13746: Attempt to fix flaky test by waiting to fetch 2 topics f…
vamossagar12 commented on code in PR #12104:
URL: https://github.com/apache/kafka/pull/12104#discussion_r860646773
##########
core/src/test/scala/integration/kafka/admin/TopicCommandIntegrationTest.scala:
##########
@@ -733,12 +733,18 @@ class TopicCommandIntegrationTest extends KafkaServerTestHarness with Logging wi
killBroker(0)
val aliveServers = brokers.filterNot(_.config.brokerId == 0)
TestUtils.waitForPartitionMetadata(aliveServers, underMinIsrTopic, 0)
- val output = TestUtils.grabConsoleOutput(
- topicService.describeTopic(new TopicCommandOptions(Array("--under-min-isr-partitions"))))
+ var output = ""
+ TestUtils.waitUntilTrue(
+ () => {
+ output = TestUtils.grabConsoleOutput(
+ topicService.describeTopic(new TopicCommandOptions(Array("--under-min-isr-partitions"))))
Review Comment:
I think the reason the test is failing is `assertTrue(rows(1).startsWith(s"\tTopic: $offlineTopic"))` here we aren't able to get 2 rows. So, I thought of waiting on the same command which was fetching the rows. Am I missing something?
--
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: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org