-
Notifications
You must be signed in to change notification settings - Fork 309
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
fix: clean up HTTP session and pool during tear down phase #1007
Conversation
9bb80e6
to
12ad314
Compare
Is it possible to add a simple test? |
@arithmetic1728 It might be a non-trivial task. In the original reproduction, we rely on the warning message printed to console to know if the socket is leaked. If there isn't a memory-leak-detection job, it would be tricky to create an ad-hoc one. Alternatively... we can add a test to explicitly invoke |
@lidizheng yes that works. We just need some simple mock tests to cover the newly added lines. |
I will fix the lint, and system test issue in a separate PR, they are not related to your change. |
3a5b628
to
f8461d0
Compare
* Add unit tests for the change * Fix the unittest to test on the correct class * Make linter happy
With help from @parthea , we are able to pin point the "creator" of the SSLSocket causing grpc/grpc#29227.
This PR cleans the HTTP resources in the
__del__
methods.Fixes: grpc/grpc#29227
Fixes: googleapis/python-secret-manager#271