We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
utils.wait_process_termination
1 parent 091459f commit abb42baCopy full SHA for abb42ba
tests/framework/utils.py
@@ -458,11 +458,8 @@ def wait_process_termination(p_pid):
458
got indeed killed or raises an exception if the process
459
is still alive after retrying several times.
460
"""
461
- try:
462
- _, stdout, _ = check_output("ps --pid {} -o comm=".format(p_pid))
463
- except ChildProcessError:
464
- return
465
- raise Exception("{} process is still alive: ".format(stdout.strip()))
+ if psutil.pid_exists(p_pid):
+ raise Exception(f"[{p_pid}] process is still alive")
466
467
468
def get_firecracker_version_from_toml():
0 commit comments