DL1231 commented on code in PR #21726:
URL: https://github.com/apache/kafka/pull/21726#discussion_r2936270077
##########
clients/src/test/java/org/apache/kafka/clients/consumer/RangeAssignorTest.java:
##########
@@ -388,7 +387,7 @@ public void
testRackAwareStaticMemberRangeAssignmentPersistentAfterMemberIdChang
@Test
public void testRackAwareAssignmentWithUniformSubscription() {
- Map<String, Integer> topics = mkMap(mkEntry("t1", 6), mkEntry("t2",
7), mkEntry("t3", 2));
+ Map<String, Integer> topics = Utils.mkMap(Map.entry("t1", 6),
Map.entry("t2", 7), Map.entry("t3", 2));
Review Comment:
Good point! The ordering dependency was actually in
`AbstractPartitionAssignorTest.partitionsPerTopic()`, where nextIndex
accumulates based on iteration order. I fixed it by wrapping the input with
`new TreeMap<>()` to ensure consistent sorted iteration, so all call sites can
now safely use` Map.of()` instead of `Utils.mkMap()`.
All affected tests pass.
--
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]