mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
make waiting for the server to start robust
This commit is contained in:
parent
26a1f72637
commit
239f138aea
2 changed files with 19 additions and 11 deletions
|
@ -1574,7 +1574,7 @@ class ConfigDictTest(BaseTest):
|
|||
port = find_unused_port()
|
||||
t = logging.config.listen(port)
|
||||
t.start()
|
||||
time.sleep(0.5) # give server thread some time to get ready
|
||||
t.ready.wait()
|
||||
try:
|
||||
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
||||
sock.settimeout(2.0)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue