From 3a10f404064eb520d5f6ac882dc5e9429654ef8b Mon Sep 17 00:00:00 2001 From: wookie184 Date: Fri, 23 Jun 2023 10:42:38 +0000 Subject: Kill process after waiting for it to terminate --- tests/gunicorn_utils.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'tests/gunicorn_utils.py') diff --git a/tests/gunicorn_utils.py b/tests/gunicorn_utils.py index 54a51df..7af0767 100644 --- a/tests/gunicorn_utils.py +++ b/tests/gunicorn_utils.py @@ -92,6 +92,7 @@ def run_gunicorn(config_path: str = "config/gunicorn.conf.py", **kwargs) -> Iter proc.terminate() # Actually wait for the process to finish. There doesn't seem to be a - # reliable way of checking if the timeout was reached or this ended normally, - # but if the timeout is reached it will probably error later anyway. + # reliable way of checking if process ended or the timeout was reached, + # so kill the process afterwards to be sure. proc.join(timeout=10) + proc.kill() -- cgit v1.2.3