lianetm commented on code in PR #16312:
URL: https://github.com/apache/kafka/pull/16312#discussion_r1644942652
##########
clients/src/test/java/org/apache/kafka/clients/consumer/internals/MembershipManagerImplTest.java:
##########
@@ -366,12 +384,12 @@ public void testFencingWhenStateIsPrepareLeaving() {
completeCallback(callbackEvent, membershipManager);
assertEquals(MemberState.UNSUBSCRIBED, membershipManager.state());
assertEquals(ConsumerGroupHeartbeatRequest.LEAVE_GROUP_MEMBER_EPOCH,
membershipManager.memberEpoch());
- verify(membershipManager).notifyEpochChange(Optional.empty(),
Optional.empty());
Review Comment:
Even though I totally agree with removing all the spies there were on other
components, I would lean towards spying only on this membershipManager
component in cases like this, where it seems valuable to verify on it. It would
only mean that we spy on it when needed with `membershipManager =
spy(createMemberInStableState())` on the specific tests that do verify, and not
spying on membershipmanager for all test that in the end don;t need it. Makes
sense?
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]