You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "Nikita-Shupletsov (via GitHub)" <gi...@apache.org> on 2025/10/08 22:15:26 UTC

[PR] MINOR: changed the condition to only check the test topic to reduce the flakiness of the test. [kafka]

Nikita-Shupletsov opened a new pull request, #20664:
URL: https://github.com/apache/kafka/pull/20664

   MINOR: changed the condition to only check the test topic to reduce the flakiness of the test.
   
   


-- 
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


Re: [PR] MINOR: changed the condition to only check the test topic to reduce the flakiness of the test. [kafka]

Posted by "lianetm (via GitHub)" <gi...@apache.org>.
lianetm commented on code in PR #20664:
URL: https://github.com/apache/kafka/pull/20664#discussion_r2416952032


##########
tools/src/test/java/org/apache/kafka/tools/TopicCommandTest.java:
##########
@@ -1198,8 +1198,8 @@ public void testDescribeUnderReplicatedPartitionsWhenReassignmentIsInProgress(Cl
                     "Unexpected describe output length: " + simpleDescribeOutputRows.length);
 
             String underReplicatedOutput = captureDescribeTopicStandardOut(clusterInstance, buildTopicCommandOptionsWithBootstrap(clusterInstance, "--describe", "--under-replicated-partitions"));
-            assertEquals("", underReplicatedOutput,
-                    String.format("--under-replicated-partitions shouldn't return anything: '%s'", underReplicatedOutput));
+            assertFalse(underReplicatedOutput.contains(String.format("Topic: %s", testTopicName)),
+                    String.format("--under-replicated-partitions shouldn't contain '%s': '%s'", String.format("Topic: %s", testTopicName), underReplicatedOutput));

Review Comment:
   nit: should we extract the string formatting bit to a var (good to reuse and would be clearer)



-- 
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


Re: [PR] MINOR: changed the condition to only check the test topic to reduce the flakiness of the test. [kafka]

Posted by "lianetm (via GitHub)" <gi...@apache.org>.
lianetm merged PR #20664:
URL: https://github.com/apache/kafka/pull/20664


-- 
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


Re: [PR] MINOR: changed the condition to only check the test topic to reduce the flakiness of the test. [kafka]

Posted by "mjsax (via GitHub)" <gi...@apache.org>.
mjsax commented on code in PR #20664:
URL: https://github.com/apache/kafka/pull/20664#discussion_r2415247328


##########
tools/src/test/java/org/apache/kafka/tools/TopicCommandTest.java:
##########
@@ -1198,7 +1198,7 @@ public void testDescribeUnderReplicatedPartitionsWhenReassignmentIsInProgress(Cl
                     "Unexpected describe output length: " + simpleDescribeOutputRows.length);
 
             String underReplicatedOutput = captureDescribeTopicStandardOut(clusterInstance, buildTopicCommandOptionsWithBootstrap(clusterInstance, "--describe", "--under-replicated-partitions"));
-            assertEquals("", underReplicatedOutput,
+            assertFalse(underReplicatedOutput.contains(String.format("Topic: %s", testTopicName)),
                     String.format("--under-replicated-partitions shouldn't return anything: '%s'", underReplicatedOutput));

Review Comment:
   Nit: seems the error message would need an update, too?



-- 
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