We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7311349 commit 4479b85Copy full SHA for 4479b85
examples/server/tests/features/environment.py
@@ -5,6 +5,7 @@
5
import time
6
import traceback
7
from contextlib import closing
8
+from subprocess import TimeoutExpired
9
10
11
def before_scenario(context, scenario):
@@ -38,7 +39,9 @@ def after_scenario(context, scenario):
38
39
40
server_graceful_shutdown(context) # SIGINT
41
- if context.server_process.wait(0.5) is None:
42
+ try:
43
+ context.server_process.wait(0.5)
44
+ except TimeoutExpired:
45
print(f"server still alive after 500ms, force-killing pid={context.server_process.pid} ...")
46
context.server_process.kill() # SIGKILL
47
context.server_process.wait()
0 commit comments