diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2023-05-15 18:53:36 +0200 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2023-05-15 18:53:36 +0200 |
commit | ac16738a35b775ea3228d6a03f2920be96ab7d55 (patch) | |
tree | 032aac28582ce8436a1bbba7c57a5f2f39ecf833 /test | |
parent | signal: refactoring, add comments in tcp_server, etc. (diff) | |
download | cimple-ac16738a35b775ea3228d6a03f2920be96ab7d55.tar.gz cimple-ac16738a35b775ea3228d6a03f2920be96ab7d55.zip |
test/lib: refactoring
Diffstat (limited to 'test')
-rw-r--r-- | test/lib/process.py | 6 |
1 files changed, 4 insertions, 2 deletions
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: |