Skip to content

Commit 30f802d

Browse files
committed
server: tests: check if the server has not crashed after a scenario
1 parent 2109743 commit 30f802d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

examples/server/tests/features/environment.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ def after_scenario(context, scenario):
2323
with closing(open('llama.log', 'r')) as f:
2424
for line in f:
2525
print(line)
26+
if not is_server_listening(context.server_fqdn, context.server_port):
27+
print("ERROR: Server has crashed")
2628

2729
if not pid_exists(context.server_process.pid):
2830
assert False, f"Server not running pid={context.server_process.pid} ..."

0 commit comments

Comments
 (0)