Skip to content

Commit d80932b

Browse files
committed
Increase lock timeout in test
Avoid spurious failures if the lock gets removed before the code checks for it.
1 parent 97603d2 commit d80932b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

test/framework/toy_build.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4344,8 +4344,8 @@ def __exit__(self, type, value, traceback):
43444344

43454345
all_args = extra_args + opts
43464346

4347-
# use context manager to remove lock after 3 seconds
4348-
with RemoveLockAfter(3, toy_lock_path):
4347+
# use context manager to remove lock after 5 seconds
4348+
with RemoveLockAfter(5, toy_lock_path):
43494349
self.mock_stderr(True)
43504350
self.mock_stdout(True)
43514351
self._test_toy_build(extra_args=all_args, verify=False, raise_error=True, testing=False)
@@ -4357,7 +4357,7 @@ def __exit__(self, type, value, traceback):
43574357

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

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

0 commit comments

Comments
 (0)