[
https://issues.apache.org/jira/browse/KAFKA-17189?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17868288#comment-17868288
]
Chia-Ping Tsai commented on KAFKA-17189:
----------------------------------------
[~yangpoan] Could you please take a look at following changes:
1. move executor service to `KafkaClusterTestKit`. It means we should not
create executor service before creating `KafkaClusterTestKit`
2. KafkaClusterTestKit will create a custom thread factor which can "collect"
all created thread id and names
3. after KafkaClusterTestKit stops the executor services, `KafkaClusterTestKit`
will wait all created threads to be terminated
I feel this change makes sense to me, because tt is `KafkaClusterTestKit`
responsibility to ensure those created threads get terminated
> Add Thread::isAlive to DetectThreadLeak#of filter
> -------------------------------------------------
>
> Key: KAFKA-17189
> URL: https://issues.apache.org/jira/browse/KAFKA-17189
> Project: Kafka
> Issue Type: Sub-task
> Reporter: PoAn Yang
> Assignee: PoAn Yang
> Priority: Minor
>
> Although we have KAFKA-17159 to close kafka-cluster-test-kit-executor, we
> still have many thread leak when removing `waitForCondition` [0].
>
> Adding log to show whether thread is alive when showing "Thread leak
> detected" message, I found that detected thread is not alive. We may need to
> consider adding `Thread::isAlive` to `DetectThreadLeak#of` filter.
>
> [0]
> [https://ci-builds.apache.org/job/Kafka/job/kafka-pr/job/PR-16661/1/testReport/]
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)