Skip to content

Commit 3a10f40

Browse files
committed
Kill process after waiting for it to terminate
1 parent 17c95e8 commit 3a10f40

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

tests/gunicorn_utils.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ def run_gunicorn(config_path: str = "config/gunicorn.conf.py", **kwargs) -> Iter
9292
proc.terminate()
9393

9494
# Actually wait for the process to finish. There doesn't seem to be a
95-
# reliable way of checking if the timeout was reached or this ended normally,
96-
# but if the timeout is reached it will probably error later anyway.
95+
# reliable way of checking if process ended or the timeout was reached,
96+
# so kill the process afterwards to be sure.
9797
proc.join(timeout=10)
98+
proc.kill()

0 commit comments

Comments
 (0)