Yunyung commented on code in PR #17771:
URL: https://github.com/apache/kafka/pull/17771#discussion_r1837995366


##########
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:
   Change naming output -> message.



##########
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:
   ditto



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

Reply via email to