[qa] TestNode: Add wait_until_stopped helper method

This commit is contained in:
MarcoFalke
2017-08-16 08:52:24 -07:00
parent 777519bd96
commit faa8d9581a
5 changed files with 24 additions and 22 deletions

View File

@@ -21,7 +21,7 @@ from decimal import Decimal
import http.client
import subprocess
from test_framework.test_framework import (BitcoinTestFramework, BITCOIND_PROC_WAIT_TIMEOUT)
from test_framework.test_framework import BitcoinTestFramework
from test_framework.util import (
assert_equal,
assert_raises,
@@ -141,7 +141,7 @@ class BlockchainTest(BitcoinTestFramework):
except (ConnectionError, http.client.BadStatusLine):
pass # The node already shut down before response
self.log.debug('Node should stop at this height...')
self.nodes[0].process.wait(timeout=BITCOIND_PROC_WAIT_TIMEOUT)
self.nodes[0].wait_until_stopped()
self.start_node(0)
assert_equal(self.nodes[0].getblockcount(), 207)