qa: Test bitcond shutdown

This commit is contained in:
João Barbosa 2018-11-20 17:59:07 +00:00
parent 8d3f46ec39
commit 28479f926f
4 changed files with 35 additions and 6 deletions
test/functional/test_framework

View file

@ -325,16 +325,16 @@ class BitcoinTestFramework(metaclass=BitcoinTestMetaClass):
for node in self.nodes:
coverage.write_all_rpc_commands(self.options.coveragedir, node.rpc)
def stop_node(self, i, expected_stderr=''):
def stop_node(self, i, expected_stderr='', wait=0):
"""Stop a bitcoind test node"""
self.nodes[i].stop_node(expected_stderr)
self.nodes[i].stop_node(expected_stderr, wait=wait)
self.nodes[i].wait_until_stopped()
def stop_nodes(self):
def stop_nodes(self, wait=0):
"""Stop multiple bitcoind test nodes"""
for node in self.nodes:
# Issue RPC to stop nodes
node.stop_node()
node.stop_node(wait=wait)
for node in self.nodes:
# Wait for nodes to stop