Skip to content

Commit 9cc7eba

Browse files
author
MarcoFalke
committed
Merge #18318: test: Bump rpc timeout in feature_assumevalid to avoid valgrind timeouts
fa9b304 test: Bump rpc timeout in feature_assumevalid to avoid valgrind timeouts (MarcoFalke) fa72d27 test: Bump walletpassphrase timeouts in wallet_createwallet to avoid valgrind timeouts (MarcoFalke) Pull request description: Fixes: * https://travis-ci.org/github/bitcoin/bitcoin/jobs/661135188#L3137 * https://travis-ci.org/github/bitcoin/bitcoin/jobs/661066901#L3137 * https://travis-ci.org/github/bitcoin/bitcoin/jobs/661121674#L3828 ACKs for top commit: practicalswift: ACK fa9b304 Tree-SHA512: 9c9f844da28c08d335145cd28da84bfd6dd81285eee7410fcf8e4b3707ff6f9bd8f4c60afaa0389dbebe4b1f3a4ad209d58d0d5b8739799cc25acd920ffb2404
2 parents 5c73645 + fa9b304 commit 9cc7eba

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

test/functional/feature_assumevalid.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,16 +47,19 @@
4747
from test_framework.test_framework import BitcoinTestFramework
4848
from test_framework.util import assert_equal
4949

50+
5051
class BaseNode(P2PInterface):
5152
def send_header_for_blocks(self, new_blocks):
5253
headers_message = msg_headers()
5354
headers_message.headers = [CBlockHeader(b) for b in new_blocks]
5455
self.send_message(headers_message)
5556

57+
5658
class AssumeValidTest(BitcoinTestFramework):
5759
def set_test_params(self):
5860
self.setup_clean_chain = True
5961
self.num_nodes = 3
62+
self.rpc_timeout = 120
6063

6164
def setup_network(self):
6265
self.add_nodes(3)
@@ -187,5 +190,6 @@ def run_test(self):
187190
self.send_blocks_until_disconnected(p2p2)
188191
self.assert_blockchain_height(self.nodes[2], 101)
189192

193+
190194
if __name__ == '__main__':
191195
AssumeValidTest().main()

test/functional/wallet_createwallet.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ def run_test(self):
9999
self.nodes[0].createwallet(wallet_name='wblank', disable_private_keys=False, blank=True, passphrase='thisisapassphrase')
100100
wblank = node.get_wallet_rpc('wblank')
101101
assert_raises_rpc_error(-13, "Error: Please enter the wallet passphrase with walletpassphrase first.", wblank.signmessage, "needanargument", "test")
102-
wblank.walletpassphrase('thisisapassphrase', 10)
102+
wblank.walletpassphrase('thisisapassphrase', 60)
103103
assert_raises_rpc_error(-4, "Error: This wallet has no available keys", wblank.getnewaddress)
104104
assert_raises_rpc_error(-4, "Error: This wallet has no available keys", wblank.getrawchangeaddress)
105105

@@ -108,7 +108,7 @@ def run_test(self):
108108
self.nodes[0].createwallet(wallet_name='w6', disable_private_keys=False, blank=False, passphrase='thisisapassphrase')
109109
w6 = node.get_wallet_rpc('w6')
110110
assert_raises_rpc_error(-13, "Error: Please enter the wallet passphrase with walletpassphrase first.", w6.signmessage, "needanargument", "test")
111-
w6.walletpassphrase('thisisapassphrase', 10)
111+
w6.walletpassphrase('thisisapassphrase', 60)
112112
w6.signmessage(w6.getnewaddress('', 'legacy'), "test")
113113
w6.keypoolrefill(1)
114114
# There should only be 1 key
@@ -119,12 +119,12 @@ def run_test(self):
119119
resp = self.nodes[0].createwallet(wallet_name='w7', disable_private_keys=False, blank=False, passphrase='')
120120
assert_equal(resp['warning'], 'Empty string given as passphrase, wallet will not be encrypted.')
121121
w7 = node.get_wallet_rpc('w7')
122-
assert_raises_rpc_error(-15, 'Error: running with an unencrypted wallet, but walletpassphrase was called.', w7.walletpassphrase, '', 10)
122+
assert_raises_rpc_error(-15, 'Error: running with an unencrypted wallet, but walletpassphrase was called.', w7.walletpassphrase, '', 60)
123123

124124
self.log.info('Test making a wallet with avoid reuse flag')
125125
self.nodes[0].createwallet('w8', False, False, '', True) # Use positional arguments to check for bug where avoid_reuse could not be set for wallets without needing them to be encrypted
126126
w8 = node.get_wallet_rpc('w8')
127-
assert_raises_rpc_error(-15, 'Error: running with an unencrypted wallet, but walletpassphrase was called.', w7.walletpassphrase, '', 10)
127+
assert_raises_rpc_error(-15, 'Error: running with an unencrypted wallet, but walletpassphrase was called.', w7.walletpassphrase, '', 60)
128128
assert_equal(w8.getwalletinfo()["avoid_reuse"], True)
129129

130130
self.log.info('Using a passphrase with private keys disabled returns error')

0 commit comments

Comments
 (0)