test: Add check_interval parameter to wait_until

This also replaces two sleep calls in functional tests with wait_until
This commit is contained in:
Fabian Jahr
2024-09-21 21:23:14 +02:00
parent 16c87d91fd
commit 5468a23eb9
5 changed files with 12 additions and 12 deletions

View File

@@ -787,8 +787,8 @@ class BitcoinTestFramework(metaclass=BitcoinTestMetaClass):
self.sync_blocks(nodes)
self.sync_mempools(nodes)
def wait_until(self, test_function, timeout=60):
return wait_until_helper_internal(test_function, timeout=timeout, timeout_factor=self.options.timeout_factor)
def wait_until(self, test_function, timeout=60, check_interval=0.05):
return wait_until_helper_internal(test_function, timeout=timeout, timeout_factor=self.options.timeout_factor, check_interval=check_interval)
# Private helper methods. These should not be accessed by the subclass test scripts.