lianetm commented on PR #16017:
URL: https://github.com/apache/kafka/pull/16017#issuecomment-2127666422

   Hey @frankvicky , thanks a lot for taking on this one, I took a look and 
left some comments. Related to testing, I would suggest we start with a simple 
unit test in the HeartbeatManager, where I think we can easily repro the 
situation:
   
   1. poll and assert a HB request is generated (leave it without response)
   2. poll and assert no HB is sent (just to be sure the logic for blocking on 
inflight is in place)
   2. mock a leave group operation (membershipMgr.leaveGroup, this is what's in 
the end called when the member leaves for any reason: unsubscribed or close)
   3. poll again  and assert a HB is indeed generated (this is what should fail 
without your PR)
   4. poll again just to make sure another HB to leave is not generated
   
   Hope it helps! Let me know. Thanks!


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