lianetm commented on code in PR #16200: URL: https://github.com/apache/kafka/pull/16200#discussion_r1674318250
########## clients/src/test/java/org/apache/kafka/clients/consumer/internals/HeartbeatRequestManagerTest.java: ########## @@ -447,7 +505,8 @@ private ConsumerGroupHeartbeatRequest getHeartbeatRequest(HeartbeatRequestManage @ParameterizedTest @MethodSource("errorProvider") public void testHeartbeatResponseOnErrorHandling(final Errors error, final boolean isFatal) { - mockStableMember(); + if (isFatal) + when(membershipManager.state()).thenReturn(MemberState.FATAL); Review Comment: trying to understand why exactly we need this for, I ended up in the `ensureHeartbeatStopped` that asserts on the `membershipMgr` state to check it's fatal, was that the reason? I would say we should remove that assert on the mock that brings no value (and then probably this, if not required for anything else) -- 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