aboutsummaryrefslogtreecommitdiff
path: root/test/functional
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2018-10-08 01:29:19 -0300
committerMarcoFalke <falke.marco@gmail.com>2018-10-08 01:29:22 -0300
commitab660c8e507fead66417819e9addaadbd04ad2a9 (patch)
tree4129653824c1246b76d3e998aa8106a0f1916d6f /test/functional
parentd9acd8648e36e8fd432b6a837133589be62ec646 (diff)
parent62c304ea481d474bc87d950e21907b8b05134fe7 (diff)
Merge #14413: tests: Allow closed rpc handler in assert_start_raises_init_error
62c304ea48 tests: Allow closed http server in assert_start_raises_init_error (Chun Kuan Lee) Pull request description: The rpc handler may be unregistered when http server haven't been closed yet. So it may be allowable to get -342 `non-JSON HTTP response with \'%i %s\' from server` (503 Service Unavailable) See https://ci.appveyor.com/project/DrahtBot/bitcoin/build/master.2001. It shows "Rejecting request while shutting down" between "RPC stopped" and "Stopped HTTP server" Tree-SHA512: e1f50ab9096cf23494ccc2850c01516c4a75f112c99108759157b22fce2011682a4b88216f206702f6a56e960182c00098053ad75f13aa0eafe27046adae63da
Diffstat (limited to 'test/functional')
-rwxr-xr-xtest/functional/test_framework/test_node.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/test/functional/test_framework/test_node.py b/test/functional/test_framework/test_node.py
index 7ab7fcfcb4..c05988c661 100755
--- a/test/functional/test_framework/test_node.py
+++ b/test/functional/test_framework/test_node.py
@@ -187,7 +187,9 @@ class TestNode():
if e.errno != errno.ECONNREFUSED: # Port not yet open?
raise # unknown IO error
except JSONRPCException as e: # Initialization phase
- if e.error['code'] != -28: # RPC in warmup?
+ # -28 RPC in warmup
+ # -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 ValueError as e: # cookie file not found and no rpcuser or rpcassword. bitcoind still starting
if "No RPC credentials" not in str(e):