diff options
| author | MarcoFalke <[email protected]> | 2020-04-08 21:45:31 +0800 |
|---|---|---|
| committer | MarcoFalke <[email protected]> | 2020-04-08 21:44:39 +0800 |
| commit | faede1b293354560317b67f0b4e6874dcac6ef41 (patch) | |
| tree | 2cabf4248366e68e7eaae4c865cb367d80d682e2 | |
| parent | Merge #18532: rpc: Avoid initialization-order-fiasco on static CRPCCommand ta... (diff) | |
| download | discoin-faede1b293354560317b67f0b4e6874dcac6ef41.tar.xz discoin-faede1b293354560317b67f0b4e6874dcac6ef41.zip | |
test: Properly raise FailedToStartError when rpc shutdown before warmup finished
| -rwxr-xr-x | test/functional/test_framework/test_node.py | 4 |
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 8260c917f..53bc5ca9e 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 |