cadonna commented on code in PR #15035: URL: https://github.com/apache/kafka/pull/15035#discussion_r1432677841
########## clients/src/test/java/org/apache/kafka/clients/consumer/internals/HeartbeatRequestManagerTest.java: ########## @@ -528,13 +529,18 @@ public void testPollTimerExpiration() { heartbeatRequestManager = createHeartbeatRequestManager(); when(coordinatorRequestManager.coordinator()).thenReturn(Optional.of(new Node(1, "localhost", 9999))); when(membershipManager.shouldSkipHeartbeat()).thenReturn(false); + when(membershipManager.state()).thenReturn(MemberState.STABLE); + doNothing().when(membershipManager).transitionToStaled(); Review Comment: I do not think, you need this. Should also work without. ########## clients/src/main/java/org/apache/kafka/clients/consumer/internals/MembershipManagerImpl.java: ########## @@ -673,6 +673,9 @@ public void onHeartbeatRequestSent() { MemberState state = state(); if (isStaled()) { log.debug("Member {} is staled and is therefore leaving the group. It will rejoin upon the next poll.", memberEpoch); + // TODO: Integrate partition revocation/loss callback + // Clear the current assignment and subscribed partitions because the member has left the group + updateSubscription(new TreeSet<>(TOPIC_ID_PARTITION_COMPARATOR), true); Review Comment: Do you mean in `transitionToStaled()`? That makes sense to me. -- 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