diff options
author | Jason R. Coombs <jaraco@jaraco.com> | 2020-11-02 16:48:56 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-02 16:48:56 (GMT) |
commit | aca67da4fe68d5420401ac1782203d302875eb27 (patch) | |
tree | 73800f864240da4562ff53d137974192f866c7f5 /Lib/test/test_socketserver.py | |
parent | 4b9aad49992a825d8c76e428ed1aca81dd3878b2 (diff) | |
download | cpython-aca67da4fe68d5420401ac1782203d302875eb27.zip cpython-aca67da4fe68d5420401ac1782203d302875eb27.tar.gz cpython-aca67da4fe68d5420401ac1782203d302875eb27.tar.bz2 |
Revert "bpo-37193: remove thread objects which finished process its request (GH-13893)" (GH-23107)
This reverts commit c41559021213cfc9dc62a83fc63306b3bdc3e64b.
Diffstat (limited to 'Lib/test/test_socketserver.py')
-rw-r--r-- | Lib/test/test_socketserver.py | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/Lib/test/test_socketserver.py b/Lib/test/test_socketserver.py index 1944795f..7cdd115 100644 --- a/Lib/test/test_socketserver.py +++ b/Lib/test/test_socketserver.py @@ -277,13 +277,6 @@ class SocketServerTest(unittest.TestCase): t.join() s.server_close() - def test_close_immediately(self): - class MyServer(socketserver.ThreadingMixIn, socketserver.TCPServer): - pass - - server = MyServer((HOST, 0), lambda: None) - server.server_close() - def test_tcpserver_bind_leak(self): # Issue #22435: the server socket wouldn't be closed if bind()/listen() # failed. @@ -498,23 +491,6 @@ class MiscTestCase(unittest.TestCase): self.assertEqual(server.shutdown_called, 1) server.server_close() - def test_threads_reaped(self): - """ - In #37193, users reported a memory leak - due to the saving of every request thread. Ensure that the - threads are cleaned up after the requests complete. - """ - class MyServer(socketserver.ThreadingMixIn, socketserver.TCPServer): - pass - - server = MyServer((HOST, 0), socketserver.StreamRequestHandler) - for n in range(10): - with socket.create_connection(server.server_address): - server.handle_request() - [thread.join() for thread in server._threads] - self.assertEqual(len(server._threads), 0) - server.server_close() - if __name__ == "__main__": unittest.main() |