From af78e6cd50fec1a3bf6b1f0af997870d2f9bd452 Mon Sep 17 00:00:00 2001 From: George Sakkis Date: Mon, 21 Oct 2024 00:00:40 +0300 Subject: [PATCH] run_server fixture: wait for killed process --- tests/e2e/test_routing/conftest.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/tests/e2e/test_routing/conftest.py b/tests/e2e/test_routing/conftest.py index eaa178e1ad..1295f57647 100644 --- a/tests/e2e/test_routing/conftest.py +++ b/tests/e2e/test_routing/conftest.py @@ -1,4 +1,3 @@ -import subprocess import time from pathlib import Path from typing import Callable, List @@ -16,16 +15,13 @@ def runner(app: str, server_command: List[str]) -> None: tmp_path.joinpath("app.py").write_text(app) monkeypatch.chdir(tmp_path) - proc = psutil.Popen( - server_command, - stderr=subprocess.PIPE, - stdout=subprocess.PIPE, - ) + proc = psutil.Popen(server_command) def kill() -> None: for child in proc.children(recursive=True): child.kill() proc.kill() + proc.wait() request.addfinalizer(kill)