diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2017-07-12 14:05:43 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-07-12 14:05:43 (GMT) |
commit | d1cc037d1442cc35d1b194ec8e50901514360949 (patch) | |
tree | 67d64a29a9c850954102b7edbc99f5844b4222d6 /Lib | |
parent | 8a9cd20edca7d01b68292036029ae3735ce65edd (diff) | |
download | cpython-d1cc037d1442cc35d1b194ec8e50901514360949.zip cpython-d1cc037d1442cc35d1b194ec8e50901514360949.tar.gz cpython-d1cc037d1442cc35d1b194ec8e50901514360949.tar.bz2 |
bpo-30908: Fix dangling thread in test_os.TestSendfile (#2680)
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
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/test/test_os.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Lib/test/test_os.py b/Lib/test/test_os.py index 5ff18ce..611692f 100644 --- a/Lib/test/test_os.py +++ b/Lib/test/test_os.py @@ -2639,6 +2639,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 |