[Python-checkins] cpython (merge 3.2 -> 3.3): test_asyncore: wait explicitly for a thread termination (this dangling thread

charles-francois.natali python-checkins at python.org
Sun Jan 13 14:15:57 CET 2013


http://hg.python.org/cpython/rev/0545ecc24b3a
changeset:   81475:0545ecc24b3a
branch:      3.3
parent:      81470:623a7de80432
parent:      81474:d55a06f7ccbf
user:        Charles-François Natali <cf.natali at gmail.com>
date:        Sun Jan 13 14:08:01 2013 +0100
summary:
  test_asyncore: wait explicitly for a thread termination (this dangling thread
could be the cause of a random failure).

files:
  Lib/test/test_asyncore.py |  2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)


diff --git a/Lib/test/test_asyncore.py b/Lib/test/test_asyncore.py
--- a/Lib/test/test_asyncore.py
+++ b/Lib/test/test_asyncore.py
@@ -789,7 +789,7 @@
             t = threading.Thread(target=lambda: asyncore.loop(timeout=0.1,
                                                               count=500))
             t.start()
-
+            self.addCleanup(t.join)
 
             s = socket.socket(self.family, socket.SOCK_STREAM)
             s.settimeout(.2)

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list