Skip to content

Commit

Permalink
Increase lock timeout in test
Browse files Browse the repository at this point in the history
Avoid spurious failures if the lock gets removed before the code checks
for it.
  • Loading branch information
Flamefire committed May 12, 2023
1 parent ae1c8c7 commit 9323436
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/framework/toy_build.py
Original file line number Diff line number Diff line change
Expand Up @@ -3510,8 +3510,8 @@ def __exit__(self, type, value, traceback):

all_args = extra_args + opts

# use context manager to remove lock after 3 seconds
with RemoveLockAfter(3, toy_lock_path):
# use context manager to remove lock after 5 seconds
with RemoveLockAfter(5, toy_lock_path):
self.mock_stderr(True)
self.mock_stdout(True)
self.test_toy_build(extra_args=all_args, verify=False, raise_error=True, testing=False)
Expand All @@ -3526,7 +3526,7 @@ def __exit__(self, type, value, traceback):

wait_matches = wait_regex.findall(stdout)
# we can't rely on an exact number of 'waiting' messages, so let's go with a range...
self.assertIn(len(wait_matches), range(2, 5))
self.assertIn(len(wait_matches), range(2, 7))

self.assertTrue(ok_regex.search(stdout), "Pattern '%s' found in: %s" % (ok_regex.pattern, stdout))

Expand Down

0 comments on commit 9323436

Please sign in to comment.