-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
Unit tests leaking thread pools #566
Comments
I have the same issue.
The first line code will produce about 59 threads, but after I call the exec api and make the api variable be None ,the 59 threads still be alive in my process. |
I think the right fix is add api _client pools terminate in tearDown for each test. |
This is a known issue. Please see #411. @amoralej The tests are generated using swagger-codegen: https://github.com/swagger-api/swagger-codegen/blob/master/modules/swagger-codegen/src/main/resources/python/api_test.mustache, please feel free to patch the upstream generator. |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
Stale issues rot after 30d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
Rotten issues close after 30d of inactivity. Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
@fejta-bot: Closing this issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Unit tests in kubernetes python client don't terminate the pools in tearDown. This makes them to fail when running in specific environments with lower limits as 32bit systems, with errors like:
error: can't start new thread
I've tested it adding pools termination in unit tests and it worked fine, however i understand unit tests are generated automatically with swagger, so i'm not sure what's the right way to propose patches here.
The text was updated successfully, but these errors were encountered: