[
https://issues.apache.org/jira/browse/KAFKA-10095?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Mickael Maison resolved KAFKA-10095.
------------------------------------
Fix Version/s: 3.3.0
Resolution: Fixed
> In LogCleanerManagerTest replace get().nonEmpty call with contains
> ------------------------------------------------------------------
>
> Key: KAFKA-10095
> URL: https://issues.apache.org/jira/browse/KAFKA-10095
> Project: Kafka
> Issue Type: Improvement
> Components: log cleaner, unit tests
> Reporter: Jakob Homan
> Assignee: Divij Vaidya
> Priority: Trivial
> Labels: newbie
> Fix For: 3.3.0
>
>
> n.b. This is a newbie ticket designed to be an introduction to contributing
> for the assignee.
> In kafka.log.LogCleanerManagerTest we have two calls to
> .get(something).nonEmpty, which is equivalent to .contains(something). We
> should simplify these calls.
> {code} cleanerManager.doneCleaning(topicPartition, log.dir, 1)
> assertTrue(cleanerManager.cleaningState(topicPartition).isEmpty)
>
> assertTrue(cleanerManager.allCleanerCheckpoints.get(topicPartition).nonEmpty)
> cleanerManager.setCleaningState(topicPartition, LogCleaningAborted)
> cleanerManager.doneCleaning(topicPartition, log.dir, 1)
> assertEquals(LogCleaningPaused(1),
> cleanerManager.cleaningState(topicPartition).get)
>
> assertTrue(cleanerManager.allCleanerCheckpoints.get(topicPartition).nonEmpty){code}
--
This message was sent by Atlassian Jira
(v8.20.7#820007)