CalvinConfluent commented on code in PR #15470: URL: https://github.com/apache/kafka/pull/15470#discussion_r1526696015
########## tools/src/test/java/org/apache/kafka/tools/TopicCommandIntegrationTest.java: ########## @@ -639,6 +639,25 @@ public void testDescribe(String quorum) throws ExecutionException, InterruptedEx assertTrue(rows[0].startsWith(String.format("Topic: %s", testTopicName)), "Row does not start with " + testTopicName + ". Row is: " + rows[0]); } + @ParameterizedTest(name = ToolsTestUtils.TEST_WITH_PARAMETERIZED_QUORUM_NAME) + @ValueSource(strings = {"quorum=zk", "quorum=kraft"}) + public void testDescribeWithDescribeTopicPartitionsApi(String quorum) throws ExecutionException, InterruptedException { + TestUtils.createTopicWithAdmin(adminClient, testTopicName, scalaBrokers, scalaControllers, 3, (short) 2, + scala.collection.immutable.Map$.MODULE$.empty(), new Properties() + ); + String secondTopicName = "test-2"; + TestUtils.createTopicWithAdmin(adminClient, secondTopicName, scalaBrokers, scalaControllers, 3, (short) 2, + scala.collection.immutable.Map$.MODULE$.empty(), new Properties() + ); + + String output = captureDescribeTopicStandardOut(buildTopicCommandOptionsWithBootstrap( + "--describe", "--partition-size-limit-per-response=1")); + String[] rows = output.split("\n"); + assertEquals(8, rows.length, String.join("\n", rows)); + assertTrue(rows[2].contains("\tElr"), rows[2]); + assertTrue(rows[2].contains("LastKnownElr"), rows[2]); + } + @ParameterizedTest(name = ToolsTestUtils.TEST_WITH_PARAMETERIZED_QUORUM_NAME) Review Comment: Thanks for the advice. Updated. -- 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-unsubscr...@kafka.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org