diff options
author | Charles-François Natali <cf.natali@gmail.com> | 2013-01-13 12:56:52 (GMT) |
---|---|---|
committer | Charles-François Natali <cf.natali@gmail.com> | 2013-01-13 12:56:52 (GMT) |
commit | ce1519d250ca457e60a91943d7686e2b85764170 (patch) | |
tree | 633e395d3a294ebe3e95c4d8352fe22c089720b6 | |
parent | 74fe9f307de7557282ed2b01268272efef45a910 (diff) | |
download | cpython-ce1519d250ca457e60a91943d7686e2b85764170.zip cpython-ce1519d250ca457e60a91943d7686e2b85764170.tar.gz cpython-ce1519d250ca457e60a91943d7686e2b85764170.tar.bz2 |
test_asyncore: wait explicitly for a thread termination (this dangling thread
could be the cause of a random failure).
-rw-r--r-- | Lib/test/test_asyncore.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Lib/test/test_asyncore.py b/Lib/test/test_asyncore.py index 5f55df8..8989a63 100644 --- a/Lib/test/test_asyncore.py +++ b/Lib/test/test_asyncore.py @@ -738,6 +738,7 @@ class BaseTestAPI(unittest.TestCase): server = TCPServer() t = threading.Thread(target=lambda: asyncore.loop(timeout=0.1, count=500)) t.start() + self.addCleanup(t.join) for x in range(20): s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) |