summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCharles-François Natali <cf.natali@gmail.com>2013-01-13 13:55:13 +0100
committerCharles-François Natali <cf.natali@gmail.com>2013-01-13 13:55:13 +0100
commit8c9047149b900f28211f1afeabff1858a9fbf8f9 (patch)
tree7848edac1ba0c379e333f26fc19d94c35f31fe13
parent40056de9f5eee36bbb90b1180b0db77a374dff2a (diff)
downloadcpython-git-8c9047149b900f28211f1afeabff1858a9fbf8f9.tar.gz
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.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/Lib/test/test_asyncore.py b/Lib/test/test_asyncore.py
index 8f875ffb5f..134470fb79 100644
--- a/Lib/test/test_asyncore.py
+++ b/Lib/test/test_asyncore.py
@@ -712,6 +712,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 xrange(20):
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)