-
Notifications
You must be signed in to change notification settings - Fork 13.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
KAFKA-16791: Add thread detection to ClusterTestExtensions #16427
Conversation
@@ -170,12 +185,12 @@ public void testClusterTests() throws ExecutionException, InterruptedException { | |||
@ClusterTest(types = {Type.ZK, Type.KRAFT, Type.CO_KRAFT}, disksPerBroker = 2), | |||
}) | |||
public void testClusterTestWithDisksPerBroker() throws ExecutionException, InterruptedException { | |||
Admin admin = clusterInstance.createAdminClient(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Currently, all admins created by clusterInstance.createAdminClient
are stored in a collection. They will get closed after tests, so we don't need to close they manually. I know that is a bit weird to IDE, but that is a style in code base so we can keep it as it is
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed. Thanks!
please fix the style error |
#15101 was the previous iteration of this, please see my concerns raised in that PR. |
happy to know there was a PR for it. I read the comments, and it seems we can use |
This is actually a good thing, because I don't like the cascading failure property of verifyNoUnexpectedThreads, and I think it should be replaced with an alternative without that property. This is applying it in ~45 new places that may not have been affected by the cascading failure previously. If this brings us closer to removing verifyNoUnexpectedThreads then i'm fine with it. |
I have discussed with @bboyleonp666, and he has no bandwidth to address requests. Hence, I'm about to close this PR. |
TestUtils.verifyNoUnexpectedThreads()
will verify there's no remaining threads that might affect the consequent test cases, which should be checked before and after all test cases.Committer Checklist (excluded from commit message)