chickenchickenlove commented on code in PR #23742:
URL: https://github.com/apache/kafka/pull/23742#discussion_r4370746052


##########
group-coordinator/src/test/java/org/apache/kafka/coordinator/group/assignor/UniformHomogeneousAssignmentBuilderTest.java:
##########
@@ -461,8 +445,14 @@ public void 
testReassignmentWhenOneMemberAddedAfterInitialAssignmentWithTwoMembe
             subscribedTopicMetadata
         );
 
-        assertAssignment(expectedAssignment, computedAssignment);
-        checkValidityAndBalance(members, computedAssignment);
+        // Each existing member gives up exactly one partition to the new 
member.
+        // Which partitions move depends on iteration order.
+        assertReassignment(
+            members,
+            computedAssignment,
+            Map.of(topic1Uuid, Set.of(0, 1, 2), topic2Uuid, Set.of(0, 1, 2)),
+            Map.of(memberA, 2, memberB, 2, memberC, 0)
+        );

Review Comment:
   This test change was introduced in an earlier commit because defensively 
copying the assignment changed its iteration order. That copy has since been 
removed, so this change is no longer necessary. I overlooked reverting it in 
the subsequent commits. I'll restore the original test inputs and assertions.
   
   I will remove them in the next commit.



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