Merge #15026: [test] Rename rpc_timewait to rpc_timeout

4999992c34 whitespace: Split ~300 char line into multiple ones (MarcoFalke)
fa71b38168 scripted-diff: Rename rpc_timewait to rpc_timeout (MarcoFalke)
fa3e5786d0 scripted-diff: Remove unused 'split' parameter to setup_network (MarcoFalke)

Pull request description:

  This is a bugfix, since wallet_dump currently uses the wrong name:

  18857b4c40/test/functional/wallet_dump.py (L89-L92)

  Rename all to the same name with a scripted diff (and some unrelated cleanups).

Tree-SHA512: 338ddd20dae12e6cf7aa7adbcfb239cf648017a1572b373f8431fecb184bd2a65492846d81e75a023864d9e41c94afb53044c16b79651a5937d34a5a6b772f81
This commit is contained in:
MarcoFalke 2018-12-29 20:18:43 +01:00
commit 2741b2b6f4
No known key found for this signature in database
GPG key ID: D2EA4850E7528B25
8 changed files with 21 additions and 10 deletions

View file

@ -46,7 +46,7 @@ class ChainstateWriteCrashTest(BitcoinTestFramework):
self.num_nodes = 4 self.num_nodes = 4
self.setup_clean_chain = False self.setup_clean_chain = False
# Need a bit of extra time for the nodes to start up for this test # Need a bit of extra time for the nodes to start up for this test
self.rpc_timewait = 90 self.rpc_timeout = 90
# Set -maxmempool=0 to turn off mempool memory sharing with dbcache # Set -maxmempool=0 to turn off mempool memory sharing with dbcache
# Set -rpcservertimeout=900 to reduce socket disconnects in this # Set -rpcservertimeout=900 to reduce socket disconnects in this

View file

@ -29,7 +29,7 @@ class PruneTest(BitcoinTestFramework):
def set_test_params(self): def set_test_params(self):
self.setup_clean_chain = True self.setup_clean_chain = True
self.num_nodes = 6 self.num_nodes = 6
self.rpc_timewait = 900 self.rpc_timeout = 900
# Create nodes 0 and 1 to mine. # Create nodes 0 and 1 to mine.
# Create node 2 to test pruning. # Create node 2 to test pruning.

View file

@ -32,7 +32,7 @@ class RawTransactionsTest(BitcoinTestFramework):
def skip_test_if_missing_module(self): def skip_test_if_missing_module(self):
self.skip_if_no_wallet() self.skip_if_no_wallet()
def setup_network(self, split=False): def setup_network(self):
self.setup_nodes() self.setup_nodes()
connect_nodes_bi(self.nodes, 0, 1) connect_nodes_bi(self.nodes, 0, 1)

View file

@ -47,7 +47,7 @@ class RawTransactionsTest(BitcoinTestFramework):
def skip_test_if_missing_module(self): def skip_test_if_missing_module(self):
self.skip_if_no_wallet() self.skip_if_no_wallet()
def setup_network(self, split=False): def setup_network(self):
super().setup_network() super().setup_network()
connect_nodes_bi(self.nodes, 0, 2) connect_nodes_bi(self.nodes, 0, 2)

View file

@ -95,7 +95,7 @@ class BitcoinTestFramework(metaclass=BitcoinTestMetaClass):
self.nodes = [] self.nodes = []
self.network_thread = None self.network_thread = None
self.mocktime = 0 self.mocktime = 0
self.rpc_timewait = 60 # Wait for up to 60 seconds for the RPC server to respond self.rpc_timeout = 60 # Wait for up to 60 seconds for the RPC server to respond
self.supports_cli = False self.supports_cli = False
self.bind_to_localhost_only = True self.bind_to_localhost_only = True
self.set_test_params() self.set_test_params()
@ -301,7 +301,7 @@ class BitcoinTestFramework(metaclass=BitcoinTestMetaClass):
i, i,
get_datadir_path(self.options.tmpdir, i), get_datadir_path(self.options.tmpdir, i),
rpchost=rpchost, rpchost=rpchost,
timewait=self.rpc_timewait, timewait=self.rpc_timeout,
bitcoind=binary[i], bitcoind=binary[i],
bitcoin_cli=self.options.bitcoincli, bitcoin_cli=self.options.bitcoincli,
mocktime=self.mocktime, mocktime=self.mocktime,
@ -445,7 +445,18 @@ class BitcoinTestFramework(metaclass=BitcoinTestMetaClass):
args = [self.options.bitcoind, "-datadir=" + datadir, '-disablewallet'] args = [self.options.bitcoind, "-datadir=" + datadir, '-disablewallet']
if i > 0: if i > 0:
args.append("-connect=127.0.0.1:" + str(p2p_port(0))) args.append("-connect=127.0.0.1:" + str(p2p_port(0)))
self.nodes.append(TestNode(i, get_datadir_path(self.options.cachedir, i), extra_conf=["bind=127.0.0.1"], extra_args=[], rpchost=None, timewait=self.rpc_timewait, bitcoind=self.options.bitcoind, bitcoin_cli=self.options.bitcoincli, mocktime=self.mocktime, coverage_dir=None)) self.nodes.append(TestNode(
i,
get_datadir_path(self.options.cachedir, i),
extra_conf=["bind=127.0.0.1"],
extra_args=[],
rpchost=None,
timewait=self.rpc_timeout,
bitcoind=self.options.bitcoind,
bitcoin_cli=self.options.bitcoincli,
mocktime=self.mocktime,
coverage_dir=None,
))
self.nodes[i].args = args self.nodes[i].args = args
self.start_node(i) self.start_node(i)

View file

@ -48,7 +48,7 @@ class WalletBackupTest(BitcoinTestFramework):
def skip_test_if_missing_module(self): def skip_test_if_missing_module(self):
self.skip_if_no_wallet() self.skip_if_no_wallet()
def setup_network(self, split=False): def setup_network(self):
self.setup_nodes() self.setup_nodes()
connect_nodes(self.nodes[0], 3) connect_nodes(self.nodes[0], 3)
connect_nodes(self.nodes[1], 3) connect_nodes(self.nodes[1], 3)

View file

@ -94,7 +94,7 @@ class WalletDumpTest(BitcoinTestFramework):
def skip_test_if_missing_module(self): def skip_test_if_missing_module(self):
self.skip_if_no_wallet() self.skip_if_no_wallet()
def setup_network(self, split=False): def setup_network(self):
self.add_nodes(self.num_nodes, extra_args=self.extra_args) self.add_nodes(self.num_nodes, extra_args=self.extra_args)
self.start_nodes() self.start_nodes()

View file

@ -21,7 +21,7 @@ class WalletGroupTest(BitcoinTestFramework):
self.setup_clean_chain = True self.setup_clean_chain = True
self.num_nodes = 3 self.num_nodes = 3
self.extra_args = [[], [], ['-avoidpartialspends']] self.extra_args = [[], [], ['-avoidpartialspends']]
self.rpc_timewait = 120 self.rpc_timeout = 120
def skip_test_if_missing_module(self): def skip_test_if_missing_module(self):
self.skip_if_no_wallet() self.skip_if_no_wallet()