You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "Chia-Ping Tsai (Jira)" <ji...@apache.org> on 2026/07/01 19:27:00 UTC

[jira] [Created] (KAFKA-20759) testUnsubscribeDoesNotCommitOffsetsEvenWithAutoCommitEnabled hangs in closing

Chia-Ping Tsai created KAFKA-20759:
--------------------------------------

             Summary: testUnsubscribeDoesNotCommitOffsetsEvenWithAutoCommitEnabled hangs in closing
                 Key: KAFKA-20759
                 URL: https://issues.apache.org/jira/browse/KAFKA-20759
             Project: Kafka
          Issue Type: Bug
            Reporter: Chia-Ping Tsai
            Assignee: Chia-Ping Tsai


Since testUnsubscribeDoesNotCommitOffsetsEvenWithAutoCommitEnabled enables auto-commit, the close() method will wait for the commit event to complete. Unfortunately, the test does not mock the applicationEventHandler to handle this event before closing ....


{code:java}
        // Verify that no commit event (sync or async) was sent despite auto-commit being enabled
        verify(applicationEventHandler, never()).add(ArgumentMatchers.isA(SyncCommitEvent.class));
        verify(applicationEventHandler, never()).add(ArgumentMatchers.isA(AsyncCommitEvent.class));
        verify(applicationEventHandler, never()).add(ArgumentMatchers.isA(CommitOnCloseEvent.class));

        completeCommitSyncApplicationEventSuccessfully(); // we need to add this
{code}





--
This message was sent by Atlassian Jira
(v8.20.10#820010)