[
https://issues.apache.org/jira/browse/KAFKA-20759?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Chia-Ping Tsai resolved KAFKA-20759.
------------------------------------
Fix Version/s: 4.4.0
Resolution: Fixed
> 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: Ken Huang
> Priority: Minor
> Fix For: 4.4.0
>
>
> 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)