This was required on OS X to prevent the test from deadlocking. I'm not sure

if this is just a test problem or something deeper.  Hopefully the test will
stop hanging.
This commit is contained in:
Neal Norwitz 2008-03-31 05:39:26 +00:00
parent ee9b10a987
commit f9ff5f02d4
1 changed files with 5 additions and 0 deletions

View File

@ -417,6 +417,7 @@ def serve_forever(self):
except: except:
sys.stdout.write(''.join(traceback.format_exception(*sys.exc_info()))) sys.stdout.write(''.join(traceback.format_exception(*sys.exc_info())))
break break
time.sleep(0.1)
def server_close(self): def server_close(self):
# Again, we want this to run in a thread, so we need to override # Again, we want this to run in a thread, so we need to override
@ -970,7 +971,11 @@ def testSocketServer(self):
raise test_support.TestFailed( raise test_support.TestFailed(
"Couldn't fetch data from HTTPS server") "Couldn't fetch data from HTTPS server")
finally: finally:
if test_support.verbose:
sys.stdout.write('stopping server\n')
server.stop() server.stop()
if test_support.verbose:
sys.stdout.write('joining thread\n')
server.join() server.join()
def testAsyncoreServer(self): def testAsyncoreServer(self):