From d15f891c3127e6b855656b31e04bb1c089f8d54d Mon Sep 17 00:00:00 2001 From: Eliah Kagan Date: Fri, 1 Dec 2023 01:07:34 -0500 Subject: [PATCH] macOS needs even more extra time in test_blocking_lock_file As seen in: https://github.com/EliahKagan/GitPython/actions/runs/7056321920/attempts/1 Usually an extra_time of 0.12 (6x) is sufficient for both Windows and macOS, but sometimes macOS needs even more, so this increases it to 0.18 (9x) for macOS. --- test/test_util.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/test/test_util.py b/test/test_util.py index 77332a49d..428bd07c3 100644 --- a/test/test_util.py +++ b/test/test_util.py @@ -397,8 +397,10 @@ def test_blocking_lock_file(self): self.assertRaises(IOError, wait_lock._obtain_lock) elapsed = time.time() - start extra_time = 0.02 - if os.name == "nt" or sys.platform == "cygwin" or sys.platform == "darwin": - extra_time *= 6 # NOTE: Indeterministic failures without this... + if os.name == "nt" or sys.platform == "cygwin": + extra_time *= 6 # Without this, we get indeterministic failures on Windows. + elif sys.platform == "darwin": + extra_time *= 9 # The situation on macOS is similar, but with more delay. self.assertLess(elapsed, wait_time + extra_time) def test_user_id(self):