[
https://issues.apache.org/jira/browse/KAFKA-16072?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17818205#comment-17818205
]
Dmitry Werner commented on KAFKA-16072:
---------------------------------------
I don't have any good ideas on how to finish my PR to make it useful for
detecting leaks (the idea of adding the thread name to the expected list
doesn't seem like an optimal solution). Therefore, I'm taking the task off
myself. Anyone who wants to can use the developments from my PR.
https://github.com/apache/kafka/pull/15101
> Create Junit 5 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
> Assignee: Dmitry Werner
> Priority: Major
> Labels: newbie++
> Fix For: 3.8.0
>
>
> The objective of this task is to create a Junit extension that will execute
> after every test and verify that there are no lingering threads left over.
> An example of how to create an 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)