dongnuo123 commented on code in PR #24269:
URL: https://github.com/apache/kafka/pull/24269#discussion_r4607085100


##########
group-coordinator/src/test/java/org/apache/kafka/coordinator/group/modern/consumer/ConsumerGroupTest.java:
##########
@@ -727,6 +736,32 @@ public void testPreferredServerAssignor() {
         );
     }
 
+    @Test
+    public void testPreferredServerAssignorWithTiedVote() {
+        ConsumerGroup consumerGroup = createConsumerGroup("foo");
+
+        ConsumerGroupMember member1 = new 
ConsumerGroupMember.Builder("member1")
+            .setServerAssignorName("uniform")
+            .build();
+        ConsumerGroupMember member2 = new 
ConsumerGroupMember.Builder("member2")
+            .setServerAssignorName("range")
+            .build();
+
+        consumerGroup.updateMember(member1);
+        consumerGroup.updateMember(member2);
+
+        // Range and uniform have one vote each. Updating a member removes its 
vote and adds it
+        // back, which reorders the stored votes. The preferred assignor 
should be range every time.

Review Comment:
   Rewrote the test with different configured assignor order because we now 
iterate over the configured assignor config instead of the count map



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