Skip to content

Commit 9323436

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

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
@@ -3510,8 +3510,8 @@ def __exit__(self, type, value, traceback):
35103510

35113511
all_args = extra_args + opts
35123512

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

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

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

0 commit comments

Comments
 (0)