MERGE: Solved a potential deadlock in test_telnetlib.py. Related to issue #11812

This commit is contained in:
Jesus Cea 2011-11-08 16:34:22 +01:00
commit 0fd66b8f30
2 changed files with 2 additions and 4 deletions

View File

@ -21,7 +21,6 @@ def server(evt, serv):
conn.close()
finally:
serv.close()
evt.set()
class GeneralTests(TestCase):
@ -33,11 +32,8 @@ class GeneralTests(TestCase):
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.

View File

@ -1616,6 +1616,8 @@ Tests
- 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.