From 9323436c79318317ede3e0c4fdc99bd4ed05fe3a Mon Sep 17 00:00:00 2001 From: Alexander Grund Date: Fri, 12 May 2023 13:35:48 +0200 Subject: [PATCH] Increase lock timeout in test Avoid spurious failures if the lock gets removed before the code checks for it. --- test/framework/toy_build.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/framework/toy_build.py b/test/framework/toy_build.py index 52aa18aae9..5161a872a1 100644 --- a/test/framework/toy_build.py +++ b/test/framework/toy_build.py @@ -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) @@ -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))