Changeset View
Changeset View
Standalone View
Standalone View
test/functional/test_framework/test_framework.py
Show All 27 Lines | from .util import ( | ||||
connect_nodes, | connect_nodes, | ||||
disconnect_nodes, | disconnect_nodes, | ||||
get_datadir_path, | get_datadir_path, | ||||
initialize_datadir, | initialize_datadir, | ||||
MAX_NODES, | MAX_NODES, | ||||
p2p_port, | p2p_port, | ||||
PortSeed, | PortSeed, | ||||
rpc_port, | rpc_port, | ||||
wait_until, | wait_until_helper, | ||||
) | ) | ||||
class TestStatus(Enum): | class TestStatus(Enum): | ||||
PASSED = 1 | PASSED = 1 | ||||
FAILED = 2 | FAILED = 2 | ||||
SKIPPED = 3 | SKIPPED = 3 | ||||
▲ Show 20 Lines • Show All 560 Lines • ▼ Show 20 Lines | def sync_proofs(self, nodes=None, wait=1, timeout=60): | ||||
"".join("\n {!r}".format(m) for m in nodes_proofs), | "".join("\n {!r}".format(m) for m in nodes_proofs), | ||||
)) | )) | ||||
def sync_all(self, nodes=None): | def sync_all(self, nodes=None): | ||||
self.sync_blocks(nodes) | self.sync_blocks(nodes) | ||||
self.sync_mempools(nodes) | self.sync_mempools(nodes) | ||||
def wait_until(self, test_function, timeout=60, lock=None): | def wait_until(self, test_function, timeout=60, lock=None): | ||||
return wait_until(test_function, timeout=timeout, lock=lock, | return wait_until_helper(test_function, timeout=timeout, lock=lock, | ||||
timeout_factor=self.options.timeout_factor) | timeout_factor=self.options.timeout_factor) | ||||
# Private helper methods. These should not be accessed by the subclass | # Private helper methods. These should not be accessed by the subclass | ||||
# test scripts. | # test scripts. | ||||
def _start_logging(self): | def _start_logging(self): | ||||
# Add logger and logging handlers | # Add logger and logging handlers | ||||
self.log = logging.getLogger('TestFramework') | self.log = logging.getLogger('TestFramework') | ||||
self.log.setLevel(logging.DEBUG) | self.log.setLevel(logging.DEBUG) | ||||
▲ Show 20 Lines • Show All 170 Lines • Show Last 20 Lines |