File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -70,6 +70,7 @@ def run_test(self):
70
70
assert_equal (cli_get_info ['proxy' ], network_info ['networks' ][0 ]['proxy' ])
71
71
assert_equal (cli_get_info ['difficulty' ], blockchain_info ['difficulty' ])
72
72
assert_equal (cli_get_info ['chain' ], blockchain_info ['chain' ])
73
+
73
74
if self .is_wallet_compiled ():
74
75
self .log .info ("Test that -getinfo returns the expected wallet info" )
75
76
assert_equal (cli_get_info ['balance' ], BALANCE )
@@ -81,6 +82,17 @@ def run_test(self):
81
82
else :
82
83
self .log .info ("*** Wallet not compiled; -getinfo wallet tests skipped" )
83
84
85
+ self .stop_node (0 )
86
+
87
+ self .log .info ("Test -rpcwait option waits for RPC connection instead of failing" )
88
+ # Start node without RPC connection.
89
+ self .nodes [0 ].start ()
90
+ # Verify failure without -rpcwait.
91
+ assert_raises_process_error (1 , "Could not connect to the server" , self .nodes [0 ].cli ('getblockcount' ).echo )
92
+ # Verify success using -rpcwait.
93
+ assert_equal (BLOCKS , self .nodes [0 ].cli ('-rpcwait' , 'getblockcount' ).send_cli ())
94
+ self .nodes [0 ].wait_for_rpc_connection ()
95
+
84
96
85
97
if __name__ == '__main__' :
86
98
TestBitcoinCli ().main ()
You can’t perform that action at this time.
0 commit comments