Skip to content

Commit

Permalink
Tweak multiplier in testing locks on CI.
Browse files Browse the repository at this point in the history
Getting occasional random timeouts, rarely.
  • Loading branch information
jamadden committed Feb 16, 2021
1 parent 0051e3a commit bf567fc
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/relstorage/tests/locking.py
Expand Up @@ -285,10 +285,14 @@ def checkTL_OverlappedReadCurrent_SharedLocksFirst(self):
assert self._storage._adapter.locker.supports_row_lock_nowait is not None
if self._storage._adapter.locker.supports_row_lock_nowait:
multiplier = 1.5
if RUNNING_ON_CI and 'mysql' in type(self).__name__:
# On Travis CI, we observe MySQL 8.0.21 to be very slow at this
# for some reason.
multiplier = 2.1
if RUNNING_ON_CI:
# Give some extra time on CI since the resources are shared
# and often extremely limited.
multiplier = 1.7
if 'mysql' in type(self).__name__:
# On Travis CI, we observe MySQL 8.0.21 to be very slow at this
# for some reason.
multiplier = 2.1
self.assertLessEqual(duration_blocking, commit_lock_timeout * multiplier)
else:
# Sigh. Old MySQL. Very slow. This takes around 4.5s to run both iterations.
Expand Down

0 comments on commit bf567fc

Please sign in to comment.