[qa] TestNode: Add wait_until_stopped helper method
This commit is contained in:
parent
777519bd96
commit
faa8d9581a
5 changed files with 24 additions and 22 deletions
test/functional/test_framework
|
@ -43,8 +43,6 @@ TEST_EXIT_PASSED = 0
|
|||
TEST_EXIT_FAILED = 1
|
||||
TEST_EXIT_SKIPPED = 77
|
||||
|
||||
BITCOIND_PROC_WAIT_TIMEOUT = 60
|
||||
|
||||
class BitcoinTestFramework(object):
|
||||
"""Base class for a bitcoin test script.
|
||||
|
||||
|
@ -263,8 +261,7 @@ class BitcoinTestFramework(object):
|
|||
def stop_node(self, i):
|
||||
"""Stop a bitcoind test node"""
|
||||
self.nodes[i].stop_node()
|
||||
while not self.nodes[i].is_node_stopped():
|
||||
time.sleep(0.1)
|
||||
self.nodes[i].wait_until_stopped()
|
||||
|
||||
def stop_nodes(self):
|
||||
"""Stop multiple bitcoind test nodes"""
|
||||
|
@ -274,8 +271,7 @@ class BitcoinTestFramework(object):
|
|||
|
||||
for node in self.nodes:
|
||||
# Wait for nodes to stop
|
||||
while not node.is_node_stopped():
|
||||
time.sleep(0.1)
|
||||
node.wait_until_stopped()
|
||||
|
||||
def assert_start_raises_init_error(self, i, extra_args=None, expected_msg=None):
|
||||
with tempfile.SpooledTemporaryFile(max_size=2**16) as log_stderr:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue