Divij Vaidya created KAFKA-16072:
------------------------------------

             Summary: Create Mockito extension to detect thread leak
                 Key: KAFKA-16072
                 URL: https://issues.apache.org/jira/browse/KAFKA-16072
             Project: Kafka
          Issue Type: Improvement
          Components: unit tests
            Reporter: Divij Vaidya


The objective of this task is to create a Mockito extension that will execute 
after every test and verify that there are no lingering threads left over. 

An example of how to create a Mockito extension can be found here:
[https://github.com/apache/kafka/pull/14783/files#diff-812cfc2780b6fc0e7a1648ff37912ff13aeda4189ea6b0d4d847b831f66e56d1]

An example on how to find unexpected threads is at 
[https://github.com/apache/kafka/blob/d5aa341a185f4df23bf587e55bcda4f16fc511f1/core/src/test/scala/unit/kafka/utils/TestUtils.scala#L2427]
 and also at 
https://issues.apache.org/jira/browse/KAFKA-16052?focusedCommentId=17800978&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-17800978
 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to