summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2017-07-24 15:40:50 (GMT)
committerGitHub <noreply@github.com>2017-07-24 15:40:50 (GMT)
commitbb33ccfc5a216eff753b10a8dc59ec0277f1e1fb (patch)
tree7b32be97e7233f68acdedd6186d0565d04383671
parent1daeb259799d0664c9453a3bd8e80411e65b52c9 (diff)
downloadcpython-bb33ccfc5a216eff753b10a8dc59ec0277f1e1fb.zip
cpython-bb33ccfc5a216eff753b10a8dc59ec0277f1e1fb.tar.gz
cpython-bb33ccfc5a216eff753b10a8dc59ec0277f1e1fb.tar.bz2
bpo-30908: Fix dangling thread in test_os.TestSendfile (#2680) (#2844)
tearDown() now clears explicitly the self.server variable to make sure that the thread is completely cleared when tearDownClass() checks if all threads have been cleaned up. Fix the following warning: $ ./python -m test --fail-env-changed -m test.test_os.TestSendfile.test_keywords -R 3:1 test_os (...) Warning -- threading_cleanup() failed to cleanup 0 threads after 3 sec (count: 0, dangling: 2) (...) Tests result: ENV CHANGED (cherry picked from commit d1cc037d1442cc35d1b194ec8e50901514360949)
-rw-r--r--Lib/test/test_os.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/Lib/test/test_os.py b/Lib/test/test_os.py
index e4951b4..b65ccb7 100644
--- a/Lib/test/test_os.py
+++ b/Lib/test/test_os.py
@@ -2621,6 +2621,7 @@ class TestSendfile(unittest.TestCase):
self.client.close()
if self.server.running:
self.server.stop()
+ self.server = None
def sendfile_wrapper(self, sock, file, offset, nbytes, headers=[], trailers=[]):
"""A higher level wrapper representing how an application is