[Python-checkins] r54682 - python/trunk/Lib/test/test_socketserver.py (original) (raw)

guido.van.rossum python-checkins at python.org
Wed Apr 4 19:43:06 CEST 2007


Author: guido.van.rossum Date: Wed Apr 4 19:43:02 2007 New Revision: 54682

Modified: python/trunk/Lib/test/test_socketserver.py Log: Fix a race condition in this test -- instead of assuming that it will take the test server thread at most 0.5 seconds to get ready, use an event variable.

Modified: python/trunk/Lib/test/test_socketserver.py

--- python/trunk/Lib/test/test_socketserver.py (original) +++ python/trunk/Lib/test/test_socketserver.py Wed Apr 4 19:43:02 2007 @@ -74,6 +74,7 @@ self.__addr = addr self.__svrcls = svrcls self.__hdlrcls = hdlrcls

@@ -87,6 +88,7 @@ if self.__addr != svr.socket.getsockname(): raise RuntimeError('server_address was %s, expected %s' % (self.__addr, svr.socket.getsockname()))

@@ -139,7 +141,9 @@ t.start() if verbose: print "server running" for i in range(NREQ):



More information about the Python-checkins mailing list