Rancho-7 commented on code in PR #17771:
URL: https://github.com/apache/kafka/pull/17771#discussion_r1850355256


##########
core/src/test/java/kafka/admin/ConfigCommandIntegrationTest.java:
##########
@@ -138,6 +139,34 @@ public void 
testNullStatusOnKraftCommandAlterClientMetrics() {
         assertEquals("Completed updating config for client-metric cm.", 
message);
     }
 
+    @ClusterTest
+    public void testAddConfigKeyValuesUsingCommand() throws Exception {
+
+        try (Admin client = cluster.admin()) {
+            NewTopic newTopic = new NewTopic("topic", 1, (short) 1);
+            client.createTopics(Collections.singleton(newTopic)).all().get();
+            cluster.waitForTopic("topic", 1);
+
+            Stream<String> command = Stream.concat(quorumArgs(), Stream.of(
+                    "--entity-type", "topics",
+                    "--entity-name", "topic",
+                    "--alter", "--add-config", 
"cleanup.policy=[delete,compact]"));
+
+            String message = captureStandardStream(false, run(command));
+            assertEquals("Completed updating config for topic topic.", 
message);
+
+            command = Stream.concat(quorumArgs(), Stream.of(
+                    "--entity-type", "topics",
+                    "--entity-name", "topic",
+                    "--describe"));
+
+            message = captureStandardStream(false, run(command));
+            assertTrue(message.contains("cleanup.policy=delete,compact"), 
"Config entry was not added correctly");
+

Review Comment:
   > nit: delete extra line.
   
   ok



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

Reply via email to