diff options
author | MarcoFalke <falke.marco@gmail.com> | 2021-03-16 19:25:25 +0100 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2021-03-16 19:25:31 +0100 |
commit | 5ef16038a1a8adc25438d77f60d83b2c01738fcf (patch) | |
tree | 6ae81059451fbd4054b854a204a564d8994e988d | |
parent | 01bb3afb5197cffec6bfe324a2efc314ddfdca57 (diff) | |
parent | d09120b7d1d5c94ec89f8d2c1d9060e7388be057 (diff) |
Merge #21410: test: increase rpc_timeout for fundrawtx test_transaction_too_large
d09120b7d1d5c94ec89f8d2c1d9060e7388be057 test: give fundraw more time for test_transaction_too_large (Jon Atack)
Pull request description:
to hopefully fix timeouts from a new test added in 48a0319bab of #20536 merged March 8, 2021
seen locally when running via the test runner
```
File "/home/jon/projects/bitcoin/bitcoin/test/functional/rpc_fundrawtransaction.py", line 927, in test_transaction_too_large
raise JSONRPCException({
test_framework.authproxy.JSONRPCException: 'generatetoaddress' RPC took longer than 30.000000 seconds. Consider using larger timeout for calls that take longer to return. (-344)
```
and in the CI like https://bitcoinbuilds.org/index.php?ansilog=28537952-2c92-46f2-9871-8918e5ba2738.log#l2398
```
File "/home/ubuntu/src/test/functional/rpc_fundrawtransaction.py", line 927, in test_transaction_too_large
test_framework.authproxy.JSONRPCException: 'generatetoaddress' RPC took longer than 240.000000 seconds. Consider using larger timeout for calls that take longer to return. (-344)
```
Top commit has no ACKs.
Tree-SHA512: f11c923439014fe12420f986c640fd301a26282eb41516957d73b9c751087cbae3d0e316f9ccb49bcb424f488540266f70d3f97948633e77c62bd7935df90452
-rwxr-xr-x | test/functional/rpc_fundrawtransaction.py | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/test/functional/rpc_fundrawtransaction.py b/test/functional/rpc_fundrawtransaction.py index 6b300e7231..8c9755cc8c 100755 --- a/test/functional/rpc_fundrawtransaction.py +++ b/test/functional/rpc_fundrawtransaction.py @@ -32,6 +32,7 @@ class RawTransactionsTest(BitcoinTestFramework): # This test isn't testing tx relay. Set whitelist on the peers for # instant tx relay. self.extra_args = [['-whitelist=noban@127.0.0.1']] * self.num_nodes + self.rpc_timeout = 90 # to prevent timeouts in `test_transaction_too_large` def skip_test_if_missing_module(self): self.skip_if_no_wallet() @@ -910,22 +911,23 @@ class RawTransactionsTest(BitcoinTestFramework): def test_transaction_too_large(self): self.log.info("Test fundrawtx where BnB solution would result in a too large transaction, but Knapsack would not") - self.nodes[0].createwallet("large") wallet = self.nodes[0].get_wallet_rpc(self.default_wallet_name) recipient = self.nodes[0].get_wallet_rpc("large") outputs = {} rawtx = recipient.createrawtransaction([], {wallet.getnewaddress(): 147.99899260}) - # Make 1500 0.1 BTC outputs - # The amount that we target for funding is in the BnB range when these outputs are used. - # However if these outputs are selected, the transaction will end up being too large, so it shouldn't use BnB and instead fallback to Knapsack - # but that behavior is not implemented yet. For now we just check that we get an error. - for i in range(0, 1500): + # Make 1500 0.1 BTC outputs. The amount that we target for funding is in + # the BnB range when these outputs are used. However if these outputs + # are selected, the transaction will end up being too large, so it + # shouldn't use BnB and instead fall back to Knapsack but that behavior + # is not implemented yet. For now we just check that we get an error. + for _ in range(1500): outputs[recipient.getnewaddress()] = 0.1 wallet.sendmany("", outputs) self.nodes[0].generate(10) assert_raises_rpc_error(-4, "Transaction too large", recipient.fundrawtransaction, rawtx) + if __name__ == '__main__': RawTransactionsTest().main() |