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

Ray Chiang updated KAFKA-1858:
------------------------------
    Component/s: unit tests

> Make ServerShutdownTest a bit less flaky
> ----------------------------------------
>
>                 Key: KAFKA-1858
>                 URL: https://issues.apache.org/jira/browse/KAFKA-1858
>             Project: Kafka
>          Issue Type: Bug
>          Components: unit tests
>            Reporter: Gwen Shapira
>            Priority: Major
>         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
(v7.6.3#76005)

Reply via email to