m1a2st commented on code in PR #22520:
URL: https://github.com/apache/kafka/pull/22520#discussion_r3411581734


##########
test-common/test-common-runtime/src/main/java/org/apache/kafka/common/test/junit/ClusterTestExtensions.java:
##########
@@ -108,10 +108,14 @@ public class ClusterTestExtensions implements 
TestTemplateInvocationContextProvi
     private static final String ATTACH_LISTENER_THREAD_PREFIX = "Attach 
Listener";
     private static final String PROCESS_REAPER_THREAD_PREFIX = "process 
reaper";
     private static final String RMI_THREAD_PREFIX = "RMI";
+    private static final String MOCK_WEB_SERVER_THREAD_PREFIX = 
"MockWebServer";

Review Comment:
   Yes, this is an existing issue. The original Scala version extended 
`IntegrationTestHarness` which does not have thread leak detection. After 
migrating to the new `@ClusterTest framework`, the `ClusterTestExtensions` 
automatically performs thread leak checking in `afterEach()`, which exposed the 
`MockWebServer` threads that were not fully terminated after 
`mockOAuthServer.shutdown()`. So the leak was always there, but the stricter 
constraints of the new framework made it visible.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to