Properly handle test case where server doesn't start
This commit is contained in:
parent
e7af863017
commit
b226dc4337
|
@ -113,7 +113,8 @@ class TestBlockingServer(object):
|
|||
self.server.start(blocking = True, event = event)
|
||||
thread = threading.Thread(target = run_server)
|
||||
thread.start()
|
||||
event.wait(timeout = 2)
|
||||
if not event.wait(timeout = 10):
|
||||
raise AssertionError("server didn't start in 10 seconds")
|
||||
|
||||
# Send request to exit.
|
||||
req = urlopen("http://127.0.0.1:12380/exit/", timeout = 1)
|
||||
|
|
Loading…
Reference in New Issue
Block a user