jiridanek commented on a change in pull request #1516: URL: https://github.com/apache/qpid-dispatch/pull/1516#discussion_r805141969
########## File path: tests/system_tests_http1_adaptor.py ########## @@ -905,7 +918,7 @@ def test_02_backpressure_server(self): client_sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) Review comment: ```suggestion with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as client_sock: ``` or do the `try/finally` around it, to ensure that socket does not leak if the test fails before socket is closed. Context manager (`with`) is IMO preferrable, when it can be used. Here you have three sockets, so it does not work all that well (requires three levels of nesting the `with`s). I'd go with `with` here, after all. (I realize this is old code, so I understand if you don't want to change it more than necessary.) -- 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: dev-unsubscr...@qpid.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org For additional commands, e-mail: dev-h...@qpid.apache.org