Description: test_telnetlib.py occasionally deadlocks.
Origin: cpython, http://hg.python.org/cpython/rev/76b6b85e4b78
Bug-cpython: http://bugs.python.org/issue11812
Author: User Jesus Cea <jcea@jcea.es>
Last-Update: 2011-12-13

--- a/lib-python/modified-2.7/test/test_telnetlib.py
+++ b/lib-python/modified-2.7/test/test_telnetlib.py
@@ -15,7 +15,6 @@
         1) set evt to true to let the parent know we are ready
         2) [optional] if is not False, write the list of data from dataq.get()
            to the socket.
-        3) set evt to true to let the parent know we're done
     """
     serv.listen(5)
     evt.set()
@@ -40,7 +39,6 @@
     finally:
         serv.close()
         conn.close()
-        evt.set()
 
 class GeneralTests(TestCase):
 
@@ -52,11 +50,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()
 
     def testBasic(self):
@@ -105,11 +100,8 @@
     self.thread = threading.Thread(target=server, args=(self.evt,self.sock, self.dataq))
     self.thread.start()
     self.evt.wait()
-    self.evt.clear()
-    time.sleep(.1)
 
 def _read_tearDown(self):
-    self.evt.wait()
     self.thread.join()
 
 class ReadTests(TestCase):
