From ac16738a35b775ea3228d6a03f2920be96ab7d55 Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Mon, 15 May 2023 18:53:36 +0200 Subject: test/lib: refactoring --- test/lib/process.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'test/lib') diff --git a/test/lib/process.py b/test/lib/process.py index cac7fbd..f13cb56 100644 --- a/test/lib/process.py +++ b/test/lib/process.py @@ -106,13 +106,15 @@ class Process(subprocess.Popen): return logging.info('Terminating process %s', self.log_id) self.terminate() + timeout = 3 try: - self.wait(timeout=3) + self.wait(timeout=timeout) return except subprocess.TimeoutExpired: pass + logging.info('Process %s failed to terminate in time, killing it', self.log_id) self.kill() - self.wait(timeout=3) + self.wait(timeout=timeout) class Runner: -- cgit v1.2.3