aboutsummaryrefslogtreecommitdiff
path: root/test/functional
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2020-04-18 12:56:55 -0400
committerMarcoFalke <falke.marco@gmail.com>2020-04-18 12:57:16 -0400
commit6ae99aab5d97b06d46ff940111b290f1eeb90045 (patch)
treefc2652885e6b3d9de6c67aa0ab0ce3ebc485d73e /test/functional
parentbbb1ba1814738d9d641bff69564972083013e130 (diff)
parentfabfcad8764bb8f807b0ac5f3482b414278a4525 (diff)
Merge #18692: test: Bump timeout in wallet_import_rescan
fabfcad8764bb8f807b0ac5f3482b414278a4525 test: Bump timeout in wallet_import_rescan (MarcoFalke) Pull request description: Avoid timeouts when starting the node, also make error message more verbose ACKs for top commit: practicalswift: ACK fabfcad8764bb8f807b0ac5f3482b414278a4525 -- patch looks correct Tree-SHA512: 8fd60a05380349f521d0e814d2f268702dfbe57c7567a4f6e94435498dfdd32909179d75fded44757ecb1a93a4045842bc6d00bfd6cd18ba751513461359c7b0
Diffstat (limited to 'test/functional')
-rwxr-xr-xtest/functional/test_framework/test_node.py3
-rwxr-xr-xtest/functional/wallet_import_rescan.py3
2 files changed, 3 insertions, 3 deletions
diff --git a/test/functional/test_framework/test_node.py b/test/functional/test_framework/test_node.py
index df017e7e16..ba72d1c622 100755
--- a/test/functional/test_framework/test_node.py
+++ b/test/functional/test_framework/test_node.py
@@ -241,7 +241,7 @@ class TestNode():
if "No RPC credentials" not in str(e):
raise
time.sleep(1.0 / poll_per_s)
- self._raise_assertion_error("Unable to connect to bitcoind")
+ self._raise_assertion_error("Unable to connect to bitcoind after {}s".format(self.rpc_timeout))
def generate(self, nblocks, maxtries=1000000):
self.log.debug("TestNode.generate() dispatches `generate` call to `generatetoaddress`")
@@ -527,7 +527,6 @@ def arg_to_cli(arg):
class TestNodeCLI():
"""Interface to bitcoin-cli for an individual node"""
-
def __init__(self, binary, datadir):
self.options = []
self.binary = binary
diff --git a/test/functional/wallet_import_rescan.py b/test/functional/wallet_import_rescan.py
index b8b85b7a19..4ff7f1d525 100755
--- a/test/functional/wallet_import_rescan.py
+++ b/test/functional/wallet_import_rescan.py
@@ -40,7 +40,6 @@ Rescan = enum.Enum("Rescan", "no yes late_timestamp")
class Variant(collections.namedtuple("Variant", "call data address_type rescan prune")):
"""Helper for importing one key and verifying scanned transactions."""
-
def do_import(self, timestamp):
"""Call one key import RPC."""
rescan = self.rescan == Rescan.yes
@@ -146,6 +145,7 @@ class ImportRescanTest(BitcoinTestFramework):
def set_test_params(self):
self.num_nodes = 2 + len(IMPORT_NODES)
self.supports_cli = False
+ self.rpc_timeout = 120
def skip_test_if_missing_module(self):
self.skip_if_no_wallet()
@@ -226,5 +226,6 @@ class ImportRescanTest(BitcoinTestFramework):
variant.expected_txs += 1
variant.check(variant.sent_txid, variant.sent_amount, variant.confirmation_height)
+
if __name__ == "__main__":
ImportRescanTest().main()