Skip to content

Commit 62c304e

Browse files
committed
tests: Allow closed http server in assert_start_raises_init_error
1 parent f504a14 commit 62c304e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

test/functional/test_framework/test_node.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,9 @@ def wait_for_rpc_connection(self):
187187
if e.errno != errno.ECONNREFUSED: # Port not yet open?
188188
raise # unknown IO error
189189
except JSONRPCException as e: # Initialization phase
190-
if e.error['code'] != -28: # RPC in warmup?
190+
# -28 RPC in warmup
191+
# -342 Service unavailable, RPC server started but is shutting down due to error
192+
if e.error['code'] != -28 and e.error['code'] != -342:
191193
raise # unknown JSON RPC exception
192194
except ValueError as e: # cookie file not found and no rpcuser or rpcassword. bitcoind still starting
193195
if "No RPC credentials" not in str(e):

0 commit comments

Comments
 (0)