Rancho-7 commented on code in PR #17771: URL: https://github.com/apache/kafka/pull/17771#discussion_r1838048135
########## core/src/test/java/kafka/admin/ConfigCommandIntegrationTest.java: ########## @@ -138,6 +139,41 @@ public void testNullStatusOnKraftCommandAlterClientMetrics() { assertEquals("Completed updating config for client-metric cm.", message); } + @ClusterTest + public void testAddConfigKeyValuesUsingCommand() throws Exception { + String topicName = "test-topic"; + + try (Admin client = cluster.createAdminClient()) { + NewTopic newTopic = new NewTopic(topicName, 1, (short) 1); + client.createTopics(Collections.singleton(newTopic)).all().get(); + } + + String configKey = "cleanup.policy"; + List<String> configValues = List.of("delete", "compact"); + String configValueStr = String.join(",", configValues); + + Stream<String> command = Stream.concat(quorumArgs(), Stream.of( + "--entity-type", "topics", + "--entity-name", topicName, + "--alter", "--add-config", configKey + "=" + "[" + configValueStr + "]")); Review Comment: done. ########## core/src/test/java/kafka/admin/ConfigCommandIntegrationTest.java: ########## @@ -138,6 +139,41 @@ public void testNullStatusOnKraftCommandAlterClientMetrics() { assertEquals("Completed updating config for client-metric cm.", message); } + @ClusterTest + public void testAddConfigKeyValuesUsingCommand() throws Exception { + String topicName = "test-topic"; + + try (Admin client = cluster.createAdminClient()) { + NewTopic newTopic = new NewTopic(topicName, 1, (short) 1); + client.createTopics(Collections.singleton(newTopic)).all().get(); + } + + String configKey = "cleanup.policy"; + List<String> configValues = List.of("delete", "compact"); + String configValueStr = String.join(",", configValues); + + Stream<String> command = Stream.concat(quorumArgs(), Stream.of( + "--entity-type", "topics", + "--entity-name", topicName, + "--alter", "--add-config", configKey + "=" + "[" + configValueStr + "]")); + + String output = captureStandardStream(false, run(command)); 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: jira-unsubscr...@kafka.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org