Skip to content

Commit 6ae99aa

Browse files
author
MarcoFalke
committed
Merge #18692: test: Bump timeout in wallet_import_rescan
fabfcad 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 fabfcad -- patch looks correct Tree-SHA512: 8fd60a05380349f521d0e814d2f268702dfbe57c7567a4f6e94435498dfdd32909179d75fded44757ecb1a93a4045842bc6d00bfd6cd18ba751513461359c7b0
2 parents bbb1ba1 + fabfcad commit 6ae99aa

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

test/functional/test_framework/test_node.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ def wait_for_rpc_connection(self):
241241
if "No RPC credentials" not in str(e):
242242
raise
243243
time.sleep(1.0 / poll_per_s)
244-
self._raise_assertion_error("Unable to connect to bitcoind")
244+
self._raise_assertion_error("Unable to connect to bitcoind after {}s".format(self.rpc_timeout))
245245

246246
def generate(self, nblocks, maxtries=1000000):
247247
self.log.debug("TestNode.generate() dispatches `generate` call to `generatetoaddress`")
@@ -527,7 +527,6 @@ def arg_to_cli(arg):
527527

528528
class TestNodeCLI():
529529
"""Interface to bitcoin-cli for an individual node"""
530-
531530
def __init__(self, binary, datadir):
532531
self.options = []
533532
self.binary = binary

test/functional/wallet_import_rescan.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@
4040

4141
class Variant(collections.namedtuple("Variant", "call data address_type rescan prune")):
4242
"""Helper for importing one key and verifying scanned transactions."""
43-
4443
def do_import(self, timestamp):
4544
"""Call one key import RPC."""
4645
rescan = self.rescan == Rescan.yes
@@ -146,6 +145,7 @@ class ImportRescanTest(BitcoinTestFramework):
146145
def set_test_params(self):
147146
self.num_nodes = 2 + len(IMPORT_NODES)
148147
self.supports_cli = False
148+
self.rpc_timeout = 120
149149

150150
def skip_test_if_missing_module(self):
151151
self.skip_if_no_wallet()
@@ -226,5 +226,6 @@ def run_test(self):
226226
variant.expected_txs += 1
227227
variant.check(variant.sent_txid, variant.sent_amount, variant.confirmation_height)
228228

229+
229230
if __name__ == "__main__":
230231
ImportRescanTest().main()

0 commit comments

Comments
 (0)