lianetm commented on code in PR #16312: URL: https://github.com/apache/kafka/pull/16312#discussion_r1644996524
########## clients/src/test/java/org/apache/kafka/clients/consumer/internals/MembershipManagerImplTest.java: ########## @@ -386,15 +404,16 @@ public void testNewAssignmentIgnoredWhenStateIsPrepareLeaving() { receiveAssignment(topicId, Arrays.asList(0, 1), membershipManager); assertEquals(MemberState.PREPARE_LEAVING, membershipManager.state()); assertTrue(membershipManager.topicsAwaitingReconciliation().isEmpty()); - verify(membershipManager, never()).markReconciliationInProgress(); // When callback completes member should transition to LEAVING. completeCallback(callbackEvent, membershipManager); + membershipManager.transitionToSendingLeaveGroup(false); Review Comment: uhm we shouldn't call this here ourselves. The test wants to ensure that when the callbacks complete, the membershipMgr internally calls this `transitionToSendingLeaveGroup`. If for some reason the transition to leaving was not happening we should review what's missing/failing that does not let the flow make it to [this](https://github.com/apache/kafka/blob/f2a552a1ebaa0ce933f90343655b63e2472856d9/clients/src/main/java/org/apache/kafka/clients/consumer/internals/MembershipManagerImpl.java#L695) point, where the internal call to transitionToSendingLeaveGroup should happen. -- 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: jira-unsubscr...@kafka.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org