Skip to content

Commit

Permalink
macOS needs even more extra time in test_blocking_lock_file
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
EliahKagan committed Dec 1, 2023
1 parent c16e4f3 commit d15f891
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions test/test_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit d15f891

Please sign in to comment.