chia7712 commented on code in PR #19069:
URL: https://github.com/apache/kafka/pull/19069#discussion_r1996278366


##########
metadata/src/test/java/org/apache/kafka/metadata/ControllerRegistrationTest.java:
##########
@@ -46,18 +44,18 @@ static <K, V> Map<K, V> doubleMap(K k1, V v1, K k2, V v2) {
         HashMap<K, V> map = new HashMap<>();
         map.put(k1, v1);
         map.put(k2, v2);
-        return Collections.unmodifiableMap(map);
+        return map;

Review Comment:
   I apologize for my inaccurate comment. This test requires a consistent 
iteration order to ensure the 'equals' check passes. Therefore, we should 
utilize `LinkedHashMap` instead of `HashMap`.



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