[Python-checkins] cpython (merge 3.2 -> default): MERGE: Solved a potential deadlock in test_telnetlib.py. Related to issue #11812

jesus.cea python-checkins at python.org
Tue Nov 8 16:39:37 CET 2011


http://hg.python.org/cpython/rev/85c10a905424
changeset:   73453:85c10a905424
parent:      73448:0b50008bb953
parent:      73451:f94533c9229d
user:        Jesus Cea <jcea at jcea.es>
date:        Tue Nov 08 16:34:22 2011 +0100
summary:
  MERGE: Solved a potential deadlock in test_telnetlib.py. Related to issue #11812

files:
  Lib/test/test_telnetlib.py |  4 ----
  Misc/NEWS                  |  2 ++
  2 files changed, 2 insertions(+), 4 deletions(-)


diff --git a/Lib/test/test_telnetlib.py b/Lib/test/test_telnetlib.py
--- a/Lib/test/test_telnetlib.py
+++ b/Lib/test/test_telnetlib.py
@@ -21,7 +21,6 @@
         conn.close()
     finally:
         serv.close()
-        evt.set()
 
 class GeneralTests(TestCase):
 
@@ -33,11 +32,8 @@
         self.thread = threading.Thread(target=server, args=(self.evt,self.sock))
         self.thread.start()
         self.evt.wait()
-        self.evt.clear()
-        time.sleep(.1)
 
     def tearDown(self):
-        self.evt.wait()
         self.thread.join()
         del self.thread  # Clear out any dangling Thread objects.
 
diff --git a/Misc/NEWS b/Misc/NEWS
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -1616,6 +1616,8 @@
 - Skip network tests when getaddrinfo() returns EAI_AGAIN, meaning a temporary
   failure in name resolution.
 
+- Solved a potential deadlock in test_telnetlib.py. Related to issue #11812.
+
 - Avoid failing in test_robotparser when mueblesmoraleda.com is flaky and
   an overzealous DNS service (e.g. OpenDNS) redirects to a placeholder
   Web site.

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


More information about the Python-checkins mailing list