aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2020-04-09 22:21:13 +0800
committerMarcoFalke <falke.marco@gmail.com>2020-04-09 22:21:17 +0800
commit081dcbde662361ddfbaf608239081c2179ff8231 (patch)
treed300b6455c9c76b0324ed08cedadc72e8fd66eef /test
parent1ae366ecb0678e7b5a0878b1e125949e3d91ba2a (diff)
parentfaede1b293354560317b67f0b4e6874dcac6ef41 (diff)
Merge #18561: test: Properly raise FailedToStartError when rpc shutdown before warmup finished
faede1b293354560317b67f0b4e6874dcac6ef41 test: Properly raise FailedToStartError when rpc shutdown before warmup finished (MarcoFalke) Pull request description: Should fix issues such as https://travis-ci.org/github/bitcoin/bitcoin/jobs/671910152#L7034 Top commit has no ACKs. Tree-SHA512: ac659f29c5ec91985c916b734e24911cbf4e2c5c4b1f1891a7e6c2d2511ec285167550fb03848eee4a7a3cbc9f8cdb0c766f4e881d9e44368c7415d007006368
Diffstat (limited to 'test')
-rwxr-xr-xtest/functional/test_framework/test_node.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/functional/test_framework/test_node.py b/test/functional/test_framework/test_node.py
index 8260c917fe..53bc5ca9e7 100755
--- a/test/functional/test_framework/test_node.py
+++ b/test/functional/test_framework/test_node.py
@@ -233,6 +233,10 @@ class TestNode():
# -342 Service unavailable, RPC server started but is shutting down due to error
if e.error['code'] != -28 and e.error['code'] != -342:
raise # unknown JSON RPC exception
+ except ConnectionResetError:
+ # This might happen when the RPC server is in warmup, but shut down before the call to getblockcount
+ # succeeds. Try again to properly raise the FailedToStartError
+ pass
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