izzyharker commented on code in PR #20907:
URL: https://github.com/apache/kafka/pull/20907#discussion_r2581893040


##########
group-coordinator/src/test/java/org/apache/kafka/coordinator/group/modern/consumer/ConsumerGroupTest.java:
##########
@@ -286,23 +287,37 @@ public void 
testUpdatingMemberUpdatesPartitionEpochWhenPartitionIsNotReleased()
                 mkTopicAssignment(fooTopicId, 1)))
             .build();
 
-        // m2 should not be able to acquire foo-1 because the partition is
-        // still owned by another member.
-        assertThrows(IllegalStateException.class, () -> 
consumerGroup.updateMember(m2));
+        // m2 can acquire foo-1 because the epoch is at least as large as m1's 
epoch.
+        consumerGroup.updateMember(m2);
+        assertEquals(mkAssignment(mkTopicAssignment(fooTopicId, 1)), 
+            consumerGroup.getOrMaybeCreateMember("m1", 
false).assignedPartitions()
+        );

Review Comment:
   The `getOrMaybeCreateMember` is used for assertions in a number of the other 
tests as well, it was meant to be a check that the `removePartitionEpochs` call 
didn't change the member assignment. It's maybe not necessary to have both that 
and the assert on the epoch though. 



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