diff options
author | John Newbery <john@johnnewbery.com> | 2017-06-02 14:30:36 -0400 |
---|---|---|
committer | John Newbery <john@johnnewbery.com> | 2017-08-15 13:12:15 -0400 |
commit | 7897338918dac072e788b8ab2919d4559f311bef (patch) | |
tree | e514317914448eaf783a2b5b980ba9339895bbdb /test/functional/rpcbind_test.py | |
parent | e526ca6284b9e13be1b912b80dd73a34e739b539 (diff) | |
download | bitcoin-7897338918dac072e788b8ab2919d4559f311bef.tar.xz |
[tests] Introduce TestNode
TestNode is a class responsible for all state related to a bitcoind node
under test. It stores local state, is responsible for tracking the
bitcoind process and delegates unrecognised messages to the RPC
connection.
This commit changes start_nodes and stop_nodes to start and stop the
bitcoind nodes in parallel, making test setup and teardown much faster.
Diffstat (limited to 'test/functional/rpcbind_test.py')
-rwxr-xr-x | test/functional/rpcbind_test.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/functional/rpcbind_test.py b/test/functional/rpcbind_test.py index 951685aa76..20808207b2 100755 --- a/test/functional/rpcbind_test.py +++ b/test/functional/rpcbind_test.py @@ -37,7 +37,7 @@ class RPCBindTest(BitcoinTestFramework): base_args += ['-rpcallowip=' + x for x in allow_ips] binds = ['-rpcbind='+addr for addr in addresses] self.nodes = self.start_nodes(self.num_nodes, self.options.tmpdir, [base_args + binds], connect_to) - pid = self.bitcoind_processes[0].pid + pid = self.nodes[0].process.pid assert_equal(set(get_bind_addrs(pid)), set(expected)) self.stop_nodes() @@ -49,7 +49,7 @@ class RPCBindTest(BitcoinTestFramework): base_args = ['-disablewallet', '-nolisten'] + ['-rpcallowip='+x for x in allow_ips] self.nodes = self.start_nodes(self.num_nodes, self.options.tmpdir, [base_args]) # connect to node through non-loopback interface - node = get_rpc_proxy(rpc_url(get_datadir_path(self.options.tmpdir, 0), 0, "%s:%d" % (rpchost, rpcport)), 0) + node = get_rpc_proxy(rpc_url(get_datadir_path(self.options.tmpdir, 0), 0, "%s:%d" % (rpchost, rpcport)), 0, coveragedir=self.options.coveragedir) node.getnetworkinfo() self.stop_nodes() |