fix: Add check to fail the benchmark test on server error (#4519)

This commit is contained in:
Andres Villegas 2020-03-30 11:04:45 -07:00 committed by GitHub
parent 4b71ac550e
commit 3892d49165
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 0 deletions

View File

@ -186,6 +186,10 @@ def run(server_cmd, port, merge_env=None, origin_cmd=None):
print output
return stats
finally:
server_retcode = server.poll()
if server_retcode is not None and server_retcode != 0:
print "server ended with error"
sys.exit(1)
server.kill()
if origin is not None:
origin.kill()

View File

@ -352,6 +352,9 @@ def spawn():
yield servers
finally:
for s in servers:
# Make sure all servers still running,
# if not assume there was an error
assert s.thread.is_alive()
s.server.shutdown()