From: Charles-François Natali Date: Sun, 13 Jan 2013 12:56:52 +0000 (+0100) Subject: test_asyncore: wait explicitly for a thread termination (this dangling thread X-Git-Tag: v3.3.1rc1~364^2~1 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ce1519d250ca457e60a91943d7686e2b85764170;p=python test_asyncore: wait explicitly for a thread termination (this dangling thread could be the cause of a random failure). --- diff --git a/Lib/test/test_asyncore.py b/Lib/test/test_asyncore.py index 5f55df89f5..8989a632e8 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)