This repository was archived by the owner on Jan 13, 2021. It is now read-only.
HTTP20Adapter.close tests (supersedes #307)#344
Merged
Lukasa merged 4 commits intopython-hyper:developmentfrom Jul 31, 2017
Merged
HTTP20Adapter.close tests (supersedes #307)#344Lukasa merged 4 commits intopython-hyper:developmentfrom
Lukasa merged 4 commits intopython-hyper:developmentfrom
Conversation
Lukasa
suggested changes
Jul 31, 2017
Member
Lukasa
left a comment
There was a problem hiding this comment.
Thanks for this! It would be good if we could add a test that demonstrates that calling close on the adapter both closes the underlying connections and also clears the connection cache. Mind adding those?
Contributor
Author
|
I've added that check to these two tests instead of creating a new one. Let me know if you think that this should be checked in a separate test. |
Lukasa
suggested changes
Jul 31, 2017
test/test_integration.py
Outdated
|
|
||
| # check that all connections are actually closed | ||
| assert (connections_before_close and | ||
| all(conn._sock is None for conn in connections_before_close)) |
Member
There was a problem hiding this comment.
Let's split the first assertion out and call it when we get the connections initially.
test/test_integration.py
Outdated
|
|
||
| # check that all connections are actually closed | ||
| assert (connections_before_close and | ||
| all(conn._sock is None for conn in connections_before_close)) |
Lukasa
approved these changes
Jul 31, 2017
Member
Lukasa
left a comment
There was a problem hiding this comment.
Very nice, this looks really good. Thanks so much!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add
close()method implementation to the requests adapter and integration tests for it.Supersedes #307
Related issue: #306