Added psutil wait_procs method in the _stop_process

This commit is contained in:
jai.s 2020-10-14 19:36:17 +05:30
parent 4f3d0f8b4d
commit 567492b9f6
No known key found for this signature in database
GPG Key ID: 360CFA25EFC67D12

View File

@ -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))