Added psutil wait_procs method in the _stop_process
This commit is contained in:
parent
4f3d0f8b4d
commit
567492b9f6
|
@ -76,6 +76,13 @@ class TestProcessProto(unittest.TestCase):
|
||||||
except psutil.TimeoutExpired:
|
except psutil.TimeoutExpired:
|
||||||
print('#####_stop_process method condition--##')
|
print('#####_stop_process method condition--##')
|
||||||
try:
|
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))
|
print('cls.process PID -{}'.format(cls.process.pid))
|
||||||
except:
|
except:
|
||||||
print('cls.process -{}'.format(cls.process))
|
print('cls.process -{}'.format(cls.process))
|
||||||
|
|
Reference in New Issue
Block a user