You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "Jakob Homan (Jira)" <ji...@apache.org> on 2020/06/03 20:48:00 UTC
[jira] [Created] (KAFKA-10095) In LogCleanerManagerTest replace
get().nonEmpty call with contains
Jakob Homan created KAFKA-10095:
-----------------------------------
Summary: 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: Sarah Gonsalves
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.3.4#803005)