Преглед на файлове

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 859c4ea5f74f713777ffa980f1627b46a311bdd4)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Julien Olivain преди 9 месеца
родител
ревизия
fa022fc4df
променени са 1 файла, в които са добавени 2 реда и са изтрити 2 реда
  1. 2 2
      support/testing/tests/package/test_bitcoin.py

+ 2 - 2
support/testing/tests/package/test_bitcoin.py

@@ -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()