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


##########
clients/src/test/java/org/apache/kafka/clients/consumer/internals/HeartbeatRequestManagerTest.java:
##########
@@ -659,95 +749,50 @@ public void 
testPollTimerExpirationShouldNotMarkMemberStaleIfMemberAlreadyLeavin
 
     @Test
     public void testisExpiredByUsedForLogging() {
-        Timer pollTimer = spy(time.timer(DEFAULT_MAX_POLL_INTERVAL_MS));
-        heartbeatRequestManager = new HeartbeatRequestManager(new 
LogContext(), pollTimer, config(),
-            coordinatorRequestManager, membershipManager, heartbeatState, 
heartbeatRequestState,
-            backgroundEventHandler, metrics);
         when(membershipManager.shouldSkipHeartbeat()).thenReturn(false);
 
         int exceededTimeMs = 5;
         time.sleep(DEFAULT_MAX_POLL_INTERVAL_MS + exceededTimeMs);
 
+        when(membershipManager.isLeavingGroup()).thenReturn(false);
         NetworkClientDelegate.PollResult pollResult = 
heartbeatRequestManager.poll(time.milliseconds());
         assertEquals(1, pollResult.unsentRequests.size());
         verify(membershipManager).transitionToSendingLeaveGroup(true);
         verify(pollTimer, never()).isExpiredBy();
-        assertEquals(exceededTimeMs, pollTimer.isExpiredBy());
 
         clearInvocations(pollTimer);
         heartbeatRequestManager.resetPollTimer(time.milliseconds());
         verify(pollTimer).isExpiredBy();
     }
 
-    @Test
-    public void testHeartbeatMetrics() {

Review Comment:
   just to double check, we're removing this because it's covered in the 
`HeartbeatMetricsManangerTest` right?



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

Reply via email to