hachikuji commented on a change in pull request #11437:
URL: https://github.com/apache/kafka/pull/11437#discussion_r736921796



##########
File path: 
shell/src/test/java/org/apache/kafka/shell/MetadataNodeManagerTest.java
##########
@@ -264,16 +264,30 @@ public void testClientQuotaRecord() {
         metadataNodeManager.handleMessage(record);
 
         assertEquals("1000.0",
-            metadataNodeManager.getData().root().directory("configs", "user", 
"kraft").file("producer_byte_rate").contents());
-        assertEquals("1000.0",
-            metadataNodeManager.getData().root().directory("configs", 
"client", "kstream").file("producer_byte_rate").contents());
+            metadataNodeManager.getData().root().directory("client-quotas",
+                "client", "kstream",
+                "user", "kraft").file("producer_byte_rate").contents());
 
         metadataNodeManager.handleMessage(record.setRemove(true));
 
         assertFalse(
-            metadataNodeManager.getData().root().directory("configs", "user", 
"kraft").children().containsKey("producer_byte_rate"));
-        assertFalse(
-            metadataNodeManager.getData().root().directory("configs", 
"client", "kstream").children().containsKey("producer_byte_rate"));
+            metadataNodeManager.getData().root().directory("client-quotas",
+                "client", "kstream",
+                "user", "kraft").children().containsKey("producer_byte_rate"));
+
+        record = new ClientQuotaRecord()
+            .setEntity(Arrays.asList(
+                new ClientQuotaRecord.EntityData()
+                    .setEntityType("user")
+                    .setEntityName(null)
+            ))
+            .setKey("producer_byte_rate")
+            .setValue(2000.0);
+
+        metadataNodeManager.handleMessage(record);
 
+        assertEquals("2000.0",
+            metadataNodeManager.getData().root().directory("client-quotas",
+                "user", "<default>").file("producer_byte_rate").contents());
     }
-}
+}

Review comment:
       nit: add back newline




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