lianetm commented on code in PR #15003:
URL: https://github.com/apache/kafka/pull/15003#discussion_r1425629956


##########
clients/src/test/java/org/apache/kafka/clients/consumer/internals/MembershipManagerImplTest.java:
##########
@@ -261,6 +261,32 @@ public void testFencingWhenStateIsPrepareLeaving() {
         assertEquals(MemberState.LEAVING, membershipManager.state());
     }
 
+    @Test
+    public void testAssignmentReceivedWhenStateIsPrepareLeaving() {

Review Comment:
   Currently `PREPARE_LEAVING` is the only state where this could happen. It's 
the only one where a transition to RECONCILE is not valid, but the member is 
still sending HB (meaning that the broker could send a new assignment anytime). 
All other states either allow the transition to RECONCILE (tested in multiple 
other tests), or do not send HB (ex. fatal). I preferred to add the check as a 
generic one based on the `previousValidStates` in case some new states in this 
situation comes out (as this is still evolving quite a bit)



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