diff options
| author | Malta Micael <[email protected]> | 2021-05-30 22:04:41 -0400 |
|---|---|---|
| committer | Malta Micael <[email protected]> | 2021-05-30 22:54:55 -0400 |
| commit | 0aa4d723e5c33736953e2c02c139e829f6828fe9 (patch) | |
| tree | 1e7183d77c47ffd206a7165c958d850b5e15cab3 /test/functional | |
| parent | Merge pull request #2210 from rnicoll/1.21-block-subsidy (diff) | |
| download | discoin-0aa4d723e5c33736953e2c02c139e829f6828fe9.tar.xz discoin-0aa4d723e5c33736953e2c02c139e829f6828fe9.zip | |
fix: reduce tests latency
Non-necessary long time sleep for sync_blocks and sync_mempools.
Diffstat (limited to 'test/functional')
| -rwxr-xr-x | test/functional/test_framework/test_framework.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/test/functional/test_framework/test_framework.py b/test/functional/test_framework/test_framework.py index f42f279cc..79106a39e 100755 --- a/test/functional/test_framework/test_framework.py +++ b/test/functional/test_framework/test_framework.py @@ -42,6 +42,8 @@ class TestStatus(Enum): TEST_EXIT_PASSED = 0 TEST_EXIT_FAILED = 1 TEST_EXIT_SKIPPED = 77 +# REDUCE WAIT LATENCY +DEFAULT_WAIT = .1 TMPDIR_PREFIX = "bitcoin_func_test_" @@ -597,7 +599,7 @@ class BitcoinTestFramework(metaclass=BitcoinTestMetaClass): self.connect_nodes(1, 2) self.sync_all() - def sync_blocks(self, nodes=None, wait=1, timeout=60): + def sync_blocks(self, nodes=None, wait=DEFAULT_WAIT, timeout=60): """ Wait until everybody has the same tip. sync_blocks needs to be called with an rpc_connections set that has least @@ -619,7 +621,7 @@ class BitcoinTestFramework(metaclass=BitcoinTestMetaClass): "".join("\n {!r}".format(b) for b in best_hash), )) - def sync_mempools(self, nodes=None, wait=1, timeout=60, flush_scheduler=True): + def sync_mempools(self, nodes=None, wait=DEFAULT_WAIT, timeout=60, flush_scheduler=True): """ Wait until everybody has the same transactions in their memory pools |