test: fix intermittent p2p_ibd_txrelay race, add test_framework.py#wait_until

This commit is contained in:
Jon Atack
2020-07-19 08:39:15 +02:00
parent 090d877160
commit 12410b1feb
2 changed files with 7 additions and 5 deletions

View File

@@ -31,6 +31,7 @@ from .util import (
disconnect_nodes,
get_datadir_path,
initialize_datadir,
wait_until,
)
@@ -602,6 +603,9 @@ class BitcoinTestFramework(metaclass=BitcoinTestMetaClass):
self.sync_blocks(nodes)
self.sync_mempools(nodes)
def wait_until(self, test_function, timeout=60, lock=None):
return wait_until(test_function, timeout=timeout, lock=lock, timeout_factor=self.options.timeout_factor)
# Private helper methods. These should not be accessed by the subclass test scripts.
def _start_logging(self):