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)