You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kafka.apache.org by "Adrian Preston (JIRA)" <ji...@apache.org> on 2015/03/18 12:13:38 UTC

[jira] [Updated] (KAFKA-1858) Make ServerShutdownTest a bit less flaky

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

Adrian Preston updated KAFKA-1858:
----------------------------------
    Attachment: KAFKA-1858.patch

> Make ServerShutdownTest a bit less flaky
> ----------------------------------------
>
>                 Key: KAFKA-1858
>                 URL: https://issues.apache.org/jira/browse/KAFKA-1858
>             Project: Kafka
>          Issue Type: Bug
>            Reporter: Gwen Shapira
>         Attachments: KAFKA-1858.patch
>
>
> ServerShutdownTest currently:
> * Starts a KafkaServer
> * Does stuff
> * Stops the server
> * Counts if there are any live kafka threads
> This is fine on its own. But when running in a test suite (i.e gradle test), the test is very very sensitive to any other test freeing all resources. If you start a server in a previous test and forgot to close it, the ServerShutdownTest will find threads from the previous test and fail.
> This makes for a flaky test that is pretty challenging to troubleshoot.
> I suggest counting the threads at the beginning and end of each test in the class, and only failing if the number at the end is greater than the number at the beginning.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)