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


##########
clients/src/test/java/org/apache/kafka/clients/consumer/internals/MembershipManagerImplTest.java:
##########
@@ -2457,10 +2538,7 @@ private CompletableFuture<Void> 
mockRevocationNoCallbacks(boolean withAutoCommit
         doNothing().when(subscriptionState).markPendingRevocation(anySet());
         
when(subscriptionState.rebalanceListener()).thenReturn(Optional.empty()).thenReturn(Optional.empty());
         if (withAutoCommit) {
-            when(commitRequestManager.autoCommitEnabled()).thenReturn(true);
-            CompletableFuture<Void> commitResult = new CompletableFuture<>();
-            
when(commitRequestManager.maybeAutoCommitSyncBeforeRevocation(anyLong())).thenReturn(commitResult);
-            return commitResult;

Review Comment:
   uhm removing this will make that in all tests that want to block on commit 
we will have to call the same 
`when(commitRequestManager.maybeAutoCommitSyncBeforeRevocation...` we had here 
I guess? I do see that you had to add this line in many places in the end. 
Again, seems related to how we're using an insntace of commitRequestManager 
mentioned in comments above. (and if we are able to move to a mocked 
commitManager this should probably stay?)  



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