提交 3a85df61 编写于 作者: L Lukáš Doktor

Merge pull request #964 from lmr/fix_test_interrupt_bug

selftests/test_interrupt.py: Handle timing problems
......@@ -152,12 +152,18 @@ class InterruptTest(unittest.TestCase):
except psutil.NoSuchProcess:
pass
if p_obj is not None:
if old_psutil:
cmdline_list = psutil.Process(p).cmdline
else:
cmdline_list = psutil.Process(p).cmdline()
if good_test.path in " ".join(cmdline_list):
good_test_processes.append(p_obj)
try:
if old_psutil:
cmdline_list = psutil.Process(p).cmdline
else:
cmdline_list = psutil.Process(p).cmdline()
if good_test.path in " ".join(cmdline_list):
good_test_processes.append(p_obj)
# psutil.NoSuchProcess happens when the original
# process already ended and left the process table
except psutil.NoSuchProcess:
pass
return len(good_test_processes) == 0
wait.wait_for(wait_until_no_goodtest, timeout=2)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册