Skip to content

Commit

Permalink
Restore longer extra time for Windows, and add for macOS
Browse files Browse the repository at this point in the history
This undoes the testing breakage of test_blocking_lock_file for
Windows, and gives macOS the same amount of extra time as Windows.

I had expected that macOS, even though it needs more time than
Ubuntu, might not need as much extra time as Windows. That turned
out not to be the case, in the limited testing done so far on CI.
Windows, while still slower than Ubuntu and still too slow to
reliably pass the test_blocking_lock_file test, was usually faster
than macOS and passed more often.

These relative timings may turn out not to be a trend and only to
apply to the current GHA runners. That's probably okay since the
adjustment for macOS wasn't present before and is being added to
allow newly introduced macOS CI test jobs to pass.

That is all in regard to the very specific issue of the extra time
required for the test_blocking_lock_file test after the lock, which
makes an assertion about that not taking too long. Regarding the
overall time of entire test jobs, macOS 13 seems to have usually
been a little faster than macOS 12, so it is retained. Unlike
"macos-latest", which currently is macOS 12, "macos-13" will never
refer to a later version of the operating system, so the version
given in the workflow should be revisited later, at or after the
time "macos-latest" becomes a synonym of "macos-13".
  • Loading branch information
EliahKagan committed Dec 1, 2023
1 parent f6f335f commit c16e4f3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/test_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@ def test_blocking_lock_file(self):
self.assertRaises(IOError, wait_lock._obtain_lock)
elapsed = time.time() - start
extra_time = 0.02
if sys.platform == "cygwin": # FIXME: Put back native Windows check.
if os.name == "nt" or sys.platform == "cygwin" or sys.platform == "darwin":
extra_time *= 6 # NOTE: Indeterministic failures without this...
self.assertLess(elapsed, wait_time + extra_time)

Expand Down

0 comments on commit c16e4f3

Please sign in to comment.