nizhikov commented on code in PR #15930:
URL: https://github.com/apache/kafka/pull/15930#discussion_r1601121898


##########
core/src/test/java/kafka/admin/ConfigCommandUnitTest.java:
##########
@@ -878,6 +886,486 @@ public void 
shouldNotDescribeUserScramCredentialsWithEntityDefaultUsingBootstrap
         verifyUserScramCredentialsNotDescribed(defaultUserOpt);
     }
 
+    @Test
+    public void shouldAddTopicConfigUsingZookeeper() {
+        ConfigCommand.ConfigCommandOptions createOpts = new 
ConfigCommand.ConfigCommandOptions(toArray("--zookeeper", ZK_CONNECT,
+            "--entity-name", "my-topic",
+            "--entity-type", "topics",
+            "--alter",
+            "--add-config", "a=b,c=d"));
+
+        KafkaZkClient zkClient = mock(KafkaZkClient.class);
+        when(zkClient.getEntityConfigs(anyString(), 
anyString())).thenReturn(new Properties());
+
+        ConfigCommand.alterConfigWithZk(null, createOpts, new 
AdminZkClient(zkClient, scala.None$.empty()) {
+            @Override
+            public void changeTopicConfig(String topic, Properties 
configChange) {
+                assertEquals("my-topic", topic);
+                assertEquals("b", configChange.get("a"));
+                assertEquals("d", configChange.get("c"));
+            }
+        });
+    }
+
+    @Test

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

Reply via email to