You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "Arun Parthiban (Jira)" <ji...@apache.org> on 2020/11/27 00:57:00 UTC

[jira] [Assigned] (KAFKA-10095) In LogCleanerManagerTest replace get().nonEmpty call with contains

     [ https://issues.apache.org/jira/browse/KAFKA-10095?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Arun Parthiban reassigned KAFKA-10095:
--------------------------------------

    Assignee: Arun Parthiban  (was: Sarah Gonsalves)

> 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: Arun Parthiban
>            Priority: Trivial
>              Labels: newbie
>
> 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)