[stream-refactor] allow up to 30 seconds to connect in unix_test

It reliably fails when running on a (intentionally) heavily loaded
machine
pull/607/head
David Wilson 5 years ago
parent db9066fbfb
commit 54987100b2

@ -86,11 +86,12 @@ class ClientTest(testlib.TestCase):
def _try_connect(self, path):
# give server a chance to setup listener
for x in range(10):
timeout = time.time() + 30.0
while True:
try:
return mitogen.unix.connect(path)
except socket.error:
if x == 9:
if time.time() > timeout:
raise
time.sleep(0.1)

Loading…
Cancel
Save