DL1231 commented on code in PR #17046:
URL: https://github.com/apache/kafka/pull/17046#discussion_r1744733025


##########
core/src/test/java/kafka/admin/ConfigCommandIntegrationTest.java:
##########
@@ -134,6 +135,21 @@ public void 
testExitWithNonZeroStatusOnZkCommandAlterGroup() {
             errOut -> assertTrue(errOut.contains("Invalid entity type groups, 
the entity type must be one of users, brokers with a --zookeeper argument"), 
errOut));
     }
 
+    @ClusterTest(types = {Type.ZK})
+    public void testExitWithNonZeroStatusOnZkCommandAlterClientMetrics() {
+        assertNonZeroStatusExit(Stream.concat(quorumArgs(), Stream.of(
+                        "--entity-type", "client-metrics",
+                        "--entity-name", "cm",
+                        "--alter", "--add-config", "metrics=org.apache")),
+                errOut -> assertTrue(errOut.contains("Invalid entity type 
client-metrics, the entity type must be one of users, brokers with a 
--zookeeper argument"), errOut));
+
+        // Test for the --group alias

Review Comment:
   nit: --client-metrics



##########
core/src/test/java/kafka/admin/ConfigCommandIntegrationTest.java:
##########
@@ -162,6 +178,23 @@ public void testNullStatusOnKraftCommandAlterGroup() {
         assertTrue(StringUtils.isBlank(message), message);
     }
 
+    @ClusterTest(types = {Type.CO_KRAFT, Type.KRAFT})
+    public void testNullStatusOnKraftCommandAlterClientMetrics() {
+        Stream<String> command = Stream.concat(quorumArgs(), Stream.of(
+                "--entity-type", "client-metrics",
+                "--entity-name", "cm",
+                "--alter", "--add-config", "metrics=org.apache"));
+        String message = captureStandardMsg(run(command));
+        assertTrue(StringUtils.isBlank(message), message);
+
+        // Test for the --group alias

Review Comment:
   ditto.



##########
core/src/test/java/kafka/admin/ConfigCommandIntegrationTest.java:
##########
@@ -325,6 +358,37 @@ private void verifyGroupConfigUpdate() throws Exception {
         }
     }
 
+
+    @ClusterTest(types = {Type.KRAFT})
+    public void testClientMetricsConfigUpdate() throws Exception {
+        alterOpts = asList("--bootstrap-server", cluster.bootstrapServers(), 
"--entity-type", "client-metrics", "--alter");
+        verifyClientMetricsConfigUpdate();
+
+        // Test for the --group alias

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