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


##########
clients/src/test/java/org/apache/kafka/clients/consumer/internals/AbstractStickyAssignorTest.java:
##########
@@ -1562,4 +1559,13 @@ protected void initializeRacks(RackConfig rackConfig) {
         this.hasConsumerRack = rackConfig != RackConfig.NO_CONSUMER_RACK;
         AbstractPartitionAssignorTest.preferRackAwareLogic(assignor, true);
     }
+
+    @SafeVarargs
+    private static <K, V> Map<K, V> orderedMap(Map.Entry<K, V>... entries) {

Review Comment:
   I initially intended to remove `Utils.mkMap()` entirely and replace all 
usages with `Map.of()`. However, I later realized that `Utils.mkMap()` uses 
LinkedHashMap internally to guarantee iteration order, which is needed in these 
tests. So I
   created `orderedMap` as a replacement, but that's essentially a duplicate of 
`Utils.mkMap()`. I've now removed the redundant orderedMap method and reverted 
these call sites back to Utils.mkMap().



##########
clients/src/test/java/org/apache/kafka/clients/consumer/internals/AbstractStickyAssignorTest.java:
##########
@@ -1562,4 +1559,13 @@ protected void initializeRacks(RackConfig rackConfig) {
         this.hasConsumerRack = rackConfig != RackConfig.NO_CONSUMER_RACK;
         AbstractPartitionAssignorTest.preferRackAwareLogic(assignor, true);
     }
+
+    @SafeVarargs
+    private static <K, V> Map<K, V> orderedMap(Map.Entry<K, V>... entries) {

Review Comment:
   I initially intended to remove `Utils.mkMap()` entirely and replace all 
usages with `Map.of()`. However, I later realized that `Utils.mkMap()` uses 
LinkedHashMap internally to guarantee iteration order, which is needed in these 
tests. So I created `orderedMap` as a replacement, but that's essentially a 
duplicate of `Utils.mkMap()`. I've now removed the redundant orderedMap method 
and reverted these call sites back to Utils.mkMap().



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