showuon commented on a change in pull request #11201:
URL: https://github.com/apache/kafka/pull/11201#discussion_r688286213



##########
File path: 
clients/src/test/java/org/apache/kafka/common/metrics/JmxReporterTest.java
##########
@@ -76,6 +77,21 @@ public void testJmxRegistration() throws Exception {
         }
     }
 
+    @Test
+    public void testMbeanTagOrdering() {
+        Map<String, String> tags = new HashMap<>();
+        tags.put("tag_a", "x");
+        tags.put("tag_b", "y");
+        tags.put("tag_c", "z");
+        tags.put("tag_d", "1,2");
+        tags.put("tag_e", "");
+        tags.put("tag_f", "3");

Review comment:
       Although `HashMap` doesn't guarantee the element order, the current test 
might make people think this test is passed due to the element insertion is 
key-ordered. Could you put the key in un-orderded sequence, so that we can make 
sure your fix works? 




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