aboutsummaryrefslogtreecommitdiff
path: root/test/functional
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2017-08-18 22:09:58 +0200
committerMarcoFalke <falke.marco@gmail.com>2017-10-03 18:23:41 +0200
commitc276c1e1d1fb18771d9efabaf5a476d29c901d5d (patch)
tree236c33e6b6b74048e67a12207146b79da2f87a40 /test/functional
parentfc2aa09cf382f024f461e103f2500e95ddb692e5 (diff)
downloadbitcoin-c276c1e1d1fb18771d9efabaf5a476d29c901d5d.tar.xz
test: Increase initial RPC timeout to 60 seconds
When running the tests locally with a parallelism of 4 on an otherwise busy system, RPC can take quite a wait to come up. Change the timeout to 60 seconds just to be safe. Github-Pull: #11091 Rebased-From: c1470a058f21bf98d83b9dc345c61626b87035cc
Diffstat (limited to 'test/functional')
-rwxr-xr-xtest/functional/test_framework/test_node.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/functional/test_framework/test_node.py b/test/functional/test_framework/test_node.py
index 66f89d43f4..4b5dc9a792 100755
--- a/test/functional/test_framework/test_node.py
+++ b/test/functional/test_framework/test_node.py
@@ -65,9 +65,9 @@ class TestNode():
def wait_for_rpc_connection(self):
"""Sets up an RPC connection to the bitcoind process. Returns False if unable to connect."""
-
- # Wait for up to 10 seconds for the RPC server to respond
- for _ in range(40):
+ timeout_s = 60 # Wait for up to 60 seconds for the RPC server to respond
+ poll_per_s = 4 # Poll at a rate of four times per second
+ for _ in range(timeout_s*poll_per_s):
assert not self.process.poll(), "bitcoind exited with status %i during initialization" % self.process.returncode
try:
self.rpc = get_rpc_proxy(rpc_url(self.datadir, self.index, self.rpchost), self.index, coveragedir=self.coverage_dir)
@@ -86,7 +86,7 @@ class TestNode():
except ValueError as e: # cookie file not found and no rpcuser or rpcassword. bitcoind still starting
if "No RPC credentials" not in str(e):
raise
- time.sleep(0.25)
+ time.sleep(1.0 / poll_per_s)
raise AssertionError("Unable to connect to bitcoind")
def get_wallet_rpc(self, wallet_name):