diff --git a/tests/cli/test_start_orion.py b/tests/cli/test_start_orion.py index 6b4271546ade..98f832223cd5 100644 --- a/tests/cli/test_start_orion.py +++ b/tests/cli/test_start_orion.py @@ -44,9 +44,10 @@ def test_sigint_sends_sigterm_then_sigkill(self): out += proc.stdout out = "".join(line.decode() for line in out) + assert proc.returncode == 0, "The main process should exit gracefully" assert re.search( r"(Sending SIGTERM)(.|\s)*(Sending SIGKILL)", out - ), "When sending two SIGINT shortly after each other, the main process should first send a SIGTERM and then a SIGKILL to the uvicorn process" + ), "When sending two SIGINT shortly after each other, the main process should first send a SIGTERM and then a SIGKILL to the uvicorn subprocess" @pytest.mark.skipif( sys.platform == "win32", @@ -71,9 +72,10 @@ def test_sigterm_sends_sigterm_then_sigkill(self): out += proc.stdout out = "".join(line.decode() for line in out) + assert proc.returncode == 0, "The main process should exit gracefully" assert re.search( r"(Sending SIGTERM)(.|\s)*(Sending SIGKILL)", out - ), "When sending two SIGTERM shortly after each other, the main process should first send a SIGTERM and then a SIGKILL to the uvicorn process" + ), "When sending two SIGTERM shortly after each other, the main process should first send a SIGTERM and then a SIGKILL to the uvicorn subprocess" @pytest.mark.skipif( sys.platform == "win32", @@ -96,10 +98,10 @@ def test_sigterm_sends_sigterm_directly(self): out += proc.stdout out = "".join(line.decode() for line in out) + assert proc.returncode == 0, "The main process should exit gracefully" assert re.search( r"(Sending SIGTERM)(.|\s)*(Application shutdown complete)", out - ), "When sending a SIGTERM, it should forward directly and exit gracefully" - assert proc.returncode == 0 + ), "When sending a SIGTERM, the main process should send a SIGTERM to the uvicorn subprocess" @pytest.mark.skipif( sys.platform != "win32", @@ -122,6 +124,7 @@ def test_sends_ctrl_break_win32(self): out += proc.stdout out = "".join(line.decode() for line in out) + assert proc.returncode == 0, "The main process should exit gracefully" assert re.search( r"Sending CTRL_BREAK_EVENT", out - ), "When sending a SIGINT, the main process should send a CTRL_BREAK_EVENT to the uvicorn process" + ), "When sending a SIGINT, the main process should send a CTRL_BREAK_EVENT to the uvicorn subprocess"