support/testing: package: bitcoin: fix test by increasing timeouts

Generating Bitcoins to an address can take longer than the current
timeout, on slow runners. This commit fixes this issue by increasing
the timeout on specific commands. This issue was also observed more
frequently on newer bitcoin-core version 28.0.

Fixes:
https://gitlab.com/buildroot.org/buildroot/-/jobs/7782083081

Signed-off-by: Julien Olivain <ju.o@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
(cherry picked from commit 859c4ea5f7)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
This commit is contained in:
Julien Olivain
2024-10-13 18:47:59 +02:00
committed by Peter Korsgaard
parent 2ea3cbc653
commit fa022fc4df

View File

@@ -130,7 +130,7 @@ class TestBitcoin(infra.basetest.BRTest):
# #1. We should receive the 50 BTC reward at this address.
cmd = self.cli_cmd
cmd += f" generatetoaddress {req_blk_count} {btc_addr1}"
self.assertRunOk(cmd)
self.assertRunOk(cmd, timeout=30)
# We should now see the previously created blocks.
cur_blk_cnt = self.get_block_count()
@@ -169,7 +169,7 @@ class TestBitcoin(infra.basetest.BRTest):
# the previous transaction (but this will not give the 50 BTC
# reward).
cmd = f"{self.cli_cmd} generatetoaddress 1 {btc_addr2}"
self.assertRunOk(cmd)
self.assertRunOk(cmd, timeout=30)
# We should see one more block.
cur_blk_cnt = self.get_block_count()