server: tests: check if the server has not crashed after a scenario

This commit is contained in:
Pierrick HYMBERT 2024-02-23 18:28:05 +01:00
parent 2109743fe3
commit 30f802d0d7

View file

@ -23,6 +23,8 @@ def after_scenario(context, scenario):
with closing(open('llama.log', 'r')) as f: with closing(open('llama.log', 'r')) as f:
for line in f: for line in f:
print(line) print(line)
if not is_server_listening(context.server_fqdn, context.server_port):
print("ERROR: Server has crashed")
if not pid_exists(context.server_process.pid): if not pid_exists(context.server_process.pid):
assert False, f"Server not running pid={context.server_process.pid} ..." assert False, f"Server not running pid={context.server_process.pid} ..."