From 567492b9f6122a04f568d829f3c12b79e1538a66 Mon Sep 17 00:00:00 2001 From: "jai.s" Date: Wed, 14 Oct 2020 19:36:17 +0530 Subject: [PATCH] Added psutil wait_procs method in the _stop_process --- src/tests/test_process.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/tests/test_process.py b/src/tests/test_process.py index fc49be20..b782554a 100755 --- a/src/tests/test_process.py +++ b/src/tests/test_process.py @@ -76,6 +76,13 @@ class TestProcessProto(unittest.TestCase): except psutil.TimeoutExpired: print('#####_stop_process method condition--##') try: + gone, alive = psutil.wait_procs(cls.process, timeout = 3, + callback = None) + for p in alive: + p.kill() + print('***********************') + print('tearDownClass are successfully killed') + print('***********************') print('cls.process PID -{}'.format(cls.process.pid)) except: print('cls.process -{}'.format(cls.process))