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


##########
core/src/test/java/kafka/admin/ConfigCommandIntegrationTest.java:
##########
@@ -138,6 +139,36 @@ 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("test-topic", 1, (short) 1);
+            client.createTopics(Collections.singleton(newTopic)).all().get();
+            cluster.waitForTopic("test-topic", 1);
+
+            Stream<String> command = Stream.concat(quorumArgs(), Stream.of(
+                    "--entity-type", "topics",
+                    "--entity-name", "test-topic",
+                    "--alter", "--add-config", 
"cleanup.policy=[delete,compact]"));
+
+            String message = captureStandardStream(false, run(command));
+            assertEquals("Completed updating config for topic test-topic.", 
message);
+
+            command = Stream.concat(quorumArgs(), Stream.of(
+                    "--entity-type", "topics",
+                    "--entity-name", "test-topic",
+                    "--describe"));
+
+            message = captureStandardStream(false, run(command));
+            assertTrue(message.contains("cleanup.policy=delete,compact"), 
"Config entry was not added correctly");
+
+            //Clean up by deleting topic
+            
client.deleteTopics(Collections.singleton("test-topic")).all().get();

Review Comment:
   Yes,you are right. Thanks!



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