From 68476d0de32a74c593a881c383988ac45dfba9f7 Mon Sep 17 00:00:00 2001 From: Nick Hill Date: Thu, 12 Mar 2026 21:40:28 -0700 Subject: [PATCH] [Tests] Shutdown test RemoteVLLMServer cleanly Signed-off-by: Nick Hill --- tests/utils.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/tests/utils.py b/tests/utils.py index e24eda90f2ba..d14c32e29548 100644 --- a/tests/utils.py +++ b/tests/utils.py @@ -235,13 +235,10 @@ def __exit__(self, exc_type, exc_value, traceback): except (ProcessLookupError, OSError): pgid = None - # Phase 1: graceful SIGTERM to the entire process group - if pgid is not None: - with contextlib.suppress(ProcessLookupError, OSError): - os.killpg(pgid, signal.SIGTERM) - print(f"[RemoteOpenAIServer] Sent SIGTERM to process group {pgid}") - else: + # Phase 1: graceful SIGTERM to the root process + with contextlib.suppress(ProcessLookupError, OSError): self.proc.terminate() + print(f"[RemoteOpenAIServer] Sent SIGTERM to process {pid}") try: self.proc.wait(timeout=15)