aboutsummaryrefslogtreecommitdiff
path: root/test/functional/test_framework/test_node.py
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2020-04-14 10:19:13 -0400
committerMarcoFalke <falke.marco@gmail.com>2020-04-18 14:58:58 -0400
commitfa03713e133e3017112fdd5c278e0c8643054578 (patch)
tree34236dc698984c1c169d0f75e86a8193d8e7d6e2 /test/functional/test_framework/test_node.py
parent4702cadca94520a36bfe979c85750563c30f7c85 (diff)
downloadbitcoin-fa03713e133e3017112fdd5c278e0c8643054578.tar.xz
test: Properly raise FailedToStartError when rpc shutdown before warmup finished (take 2)
Diffstat (limited to 'test/functional/test_framework/test_node.py')
-rwxr-xr-xtest/functional/test_framework/test_node.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/functional/test_framework/test_node.py b/test/functional/test_framework/test_node.py
index 53bc5ca9e7..2c6e460ed6 100755
--- a/test/functional/test_framework/test_node.py
+++ b/test/functional/test_framework/test_node.py
@@ -225,9 +225,6 @@ class TestNode():
self.rpc_connected = True
self.url = self.rpc.url
return
- except IOError as e:
- if e.errno != errno.ECONNREFUSED: # Port not yet open?
- raise # unknown IO error
except JSONRPCException as e: # Initialization phase
# -28 RPC in warmup
# -342 Service unavailable, RPC server started but is shutting down due to error
@@ -237,6 +234,9 @@ class TestNode():
# 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 OSError as e:
+ if e.errno != errno.ECONNREFUSED: # Port not yet open?
+ raise # unknown OS error
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