diff options
| author | Wladimir J. van der Laan <[email protected]> | 2017-06-27 19:23:58 +0200 |
|---|---|---|
| committer | Wladimir J. van der Laan <[email protected]> | 2017-06-27 19:27:57 +0200 |
| commit | acb11535cb8499fd47fdde7f52457f8945b58856 (patch) | |
| tree | 2750225308b42d2c7231c3d09573609a367961bd | |
| parent | Merge #10118: Util: Remove redundant calls to argsGlobal.IsArgSet() (diff) | |
| parent | [qa] blockchain: Pass on closed connection during generate call (diff) | |
| download | discoin-acb11535cb8499fd47fdde7f52457f8945b58856.tar.xz discoin-acb11535cb8499fd47fdde7f52457f8945b58856.zip | |
Merge #10659: [qa] blockchain: Pass on closed connection during generate call
fab1fb7 [qa] blockchain: Pass on closed connection during generate call (MarcoFalke)
Tree-SHA512: 754be08675c3aca6f8003dc4bc68336e3693609ec14afc91cec592603aabe515f82534ef7b3db469792458ae4c70d5eae0ea0e8abd0ea338e22351aa01173046
| -rwxr-xr-x | test/functional/blockchain.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/test/functional/blockchain.py b/test/functional/blockchain.py index e205c6400..eeef05efd 100755 --- a/test/functional/blockchain.py +++ b/test/functional/blockchain.py @@ -18,6 +18,7 @@ Tests correspond to code in rpc/blockchain.cpp. """ from decimal import Decimal +import http.client import subprocess from test_framework.test_framework import BitcoinTestFramework @@ -28,6 +29,7 @@ from test_framework.util import ( assert_is_hex_string, assert_is_hash_string, bitcoind_processes, + BITCOIND_PROC_WAIT_TIMEOUT, ) @@ -140,9 +142,12 @@ class BlockchainTest(BitcoinTestFramework): assert_equal(self.nodes[0].getblockcount(), 206) self.log.debug('Node should not stop at this height') assert_raises(subprocess.TimeoutExpired, lambda: bitcoind_processes[0].wait(timeout=3)) - self.nodes[0].generate(1) + 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...') - bitcoind_processes[0].wait(timeout=3) + bitcoind_processes[0].wait(timeout=BITCOIND_PROC_WAIT_TIMEOUT) self.nodes[0] = self.start_node(0, self.options.tmpdir) assert_equal(self.nodes[0].getblockcount(), 207) |