diff options
author | John Newbery <john@johnnewbery.com> | 2017-06-02 14:30:36 -0400 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2017-10-03 18:18:17 +0200 |
commit | fc2aa09cf382f024f461e103f2500e95ddb692e5 (patch) | |
tree | b0148b97dda0141ef4fccf84120b74816079cfdd /test/functional/blockchain.py | |
parent | fb7b5293844ea6adc5dcf5ad0a0c5890b4495939 (diff) | |
download | bitcoin-fc2aa09cf382f024f461e103f2500e95ddb692e5.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.
Github-Pull: #10711
Rebased-From: 7897338918dac072e788b8ab2919d4559f311bef
Diffstat (limited to 'test/functional/blockchain.py')
-rwxr-xr-x | test/functional/blockchain.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/functional/blockchain.py b/test/functional/blockchain.py index a7034e6bcd..0812e1b0df 100755 --- a/test/functional/blockchain.py +++ b/test/functional/blockchain.py @@ -139,13 +139,13 @@ class BlockchainTest(BitcoinTestFramework): self.nodes[0].generate(6) assert_equal(self.nodes[0].getblockcount(), 206) self.log.debug('Node should not stop at this height') - assert_raises(subprocess.TimeoutExpired, lambda: self.bitcoind_processes[0].wait(timeout=3)) + assert_raises(subprocess.TimeoutExpired, lambda: self.nodes[0].process.wait(timeout=3)) try: self.nodes[0].generate(1) except (ConnectionError, http.client.BadStatusLine): pass # The node already shut down before response self.log.debug('Node should stop at this height...') - self.bitcoind_processes[0].wait(timeout=BITCOIND_PROC_WAIT_TIMEOUT) + self.nodes[0].process.wait(timeout=BITCOIND_PROC_WAIT_TIMEOUT) self.nodes[0] = self.start_node(0, self.options.tmpdir) assert_equal(self.nodes[0].getblockcount(), 207) |