Changeset View
Changeset View
Standalone View
Standalone View
test/functional/feature_shutdown.py
Show All 13 Lines | def test_long_call(node): | ||||
assert_equal(block['height'], 0) | assert_equal(block['height'], 0) | ||||
class ShutdownTest(BitcoinTestFramework): | class ShutdownTest(BitcoinTestFramework): | ||||
def set_test_params(self): | def set_test_params(self): | ||||
self.setup_clean_chain = True | self.setup_clean_chain = True | ||||
self.num_nodes = 1 | self.num_nodes = 1 | ||||
self.supports_cli = False | |||||
def run_test(self): | def run_test(self): | ||||
node = get_rpc_proxy( | node = get_rpc_proxy( | ||||
self.nodes[0].url, 1, timeout=600, coveragedir=self.nodes[0].coverage_dir) | self.nodes[0].url, 1, timeout=600, coveragedir=self.nodes[0].coverage_dir) | ||||
# Force connection establishment by executing a dummy command. | # Force connection establishment by executing a dummy command. | ||||
node.getblockcount() | node.getblockcount() | ||||
Thread(target=test_long_call, args=(node,)).start() | Thread(target=test_long_call, args=(node,)).start() | ||||
# Wait until the server is executing the above `waitfornewblock`. | # Wait until the server is executing the above `waitfornewblock`. | ||||
Show All 10 Lines |