You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kafka.apache.org by "Gwen Shapira (JIRA)" <ji...@apache.org> on 2015/01/12 19:41:35 UTC

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

Gwen Shapira created KAFKA-1858:
-----------------------------------

             Summary: 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


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)