diff --git a/psutil/tests/test_unicode.py b/psutil/tests/test_unicode.py index cf9500a3f..ff24219a0 100755 --- a/psutil/tests/test_unicode.py +++ b/psutil/tests/test_unicode.py @@ -74,6 +74,7 @@ import os import shutil +import time import traceback import unittest import warnings @@ -193,6 +194,11 @@ def expect_exact_path_match(self): def test_proc_exe(self): subp = self.spawn_testproc(cmd=[self.funky_name]) + # XXX: sometimes fail with ProcessLookupError: [Errno 3] assume + # no such process (originated from GetExitCodeProcess != + # STILL_ACTIVE) + if WINDOWS and CI_TESTING: + time.sleep(.1) p = psutil.Process(subp.pid) exe = p.exe() self.assertIsInstance(exe, str) @@ -202,6 +208,11 @@ def test_proc_exe(self): def test_proc_name(self): subp = self.spawn_testproc(cmd=[self.funky_name]) + # XXX: sometimes fail with ProcessLookupError: [Errno 3] assume + # no such process (originated from GetExitCodeProcess != + # STILL_ACTIVE) + if WINDOWS and CI_TESTING: + time.sleep(.1) name = psutil.Process(subp.pid).name() self.assertIsInstance(name, str) if self.expect_exact_path_match():