From eca6a9aeff359e4f8f4674630e2d461a372464ab Mon Sep 17 00:00:00 2001 From: Giampaolo Rodola Date: Mon, 18 Dec 2023 13:42:57 +0100 Subject: [PATCH] add dirty workaround on CI --- psutil/tests/test_unicode.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/psutil/tests/test_unicode.py b/psutil/tests/test_unicode.py index cf9500a3f8..ff24219a09 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():