Skip to content

Commit 081dcbd

Browse files
author
MarcoFalke
committed
Merge #18561: test: Properly raise FailedToStartError when rpc shutdown before warmup finished
faede1b 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
2 parents 1ae366e + faede1b commit 081dcbd

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

test/functional/test_framework/test_node.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,10 @@ def wait_for_rpc_connection(self):
233233
# -342 Service unavailable, RPC server started but is shutting down due to error
234234
if e.error['code'] != -28 and e.error['code'] != -342:
235235
raise # unknown JSON RPC exception
236+
except ConnectionResetError:
237+
# This might happen when the RPC server is in warmup, but shut down before the call to getblockcount
238+
# succeeds. Try again to properly raise the FailedToStartError
239+
pass
236240
except ValueError as e: # cookie file not found and no rpcuser or rpcassword. bitcoind still starting
237241
if "No RPC credentials" not in str(e):
238242
raise

0 commit comments

Comments
 (0)