qa: only run the RPC retry functional test with bitcoind 25.0
This commit is contained in:
parent
be2030af28
commit
0f6fc48e88
@ -51,6 +51,7 @@ task:
|
||||
echo "49df6e444515d457ea0b885d66f521f2a26ca92ccf73d5296082e633544253bf bitcoin-24.0.1-x86_64-linux-gnu.tar.gz" | sha256sum -c
|
||||
tar -xzf bitcoin-24.0.1-x86_64-linux-gnu.tar.gz
|
||||
export BITCOIND_PATH=bitcoin-24.0.1/bin/bitcoind
|
||||
export IS_BITCOIND_25=0
|
||||
else
|
||||
# Download the bitcoind binary
|
||||
curl -O https://bitcoincore.org/bin/bitcoin-core-25.0/bitcoin-25.0-x86_64-linux-gnu.tar.gz
|
||||
|
||||
@ -23,6 +23,7 @@ LIANAD_PATH = os.getenv("LIANAD_PATH", DEFAULT_MS_PATH)
|
||||
DEFAULT_BITCOIND_PATH = "bitcoind"
|
||||
BITCOIND_PATH = os.getenv("BITCOIND_PATH", DEFAULT_BITCOIND_PATH)
|
||||
OLD_LIANAD_PATH = os.getenv("OLD_LIANAD_PATH", None)
|
||||
IS_BITCOIND_25 = bool(int(os.getenv("IS_BITCOIND_25", True)))
|
||||
|
||||
|
||||
COIN = 10 ** 8
|
||||
|
||||
@ -12,6 +12,7 @@ from test_framework.utils import (
|
||||
LIANAD_PATH,
|
||||
COIN,
|
||||
TIMEOUT,
|
||||
IS_BITCOIND_25,
|
||||
)
|
||||
|
||||
from threading import Thread
|
||||
@ -265,6 +266,7 @@ def test_migration(lianad_multisig, bitcoind):
|
||||
assert len(spend_txs) == 2 and all(s["updated_at"] is not None for s in spend_txs)
|
||||
|
||||
|
||||
@pytest.mark.skipif(not IS_BITCOIND_25, reason="Need 'generateblock' with 'submit=False'")
|
||||
def test_bitcoind_submit_block(bitcoind):
|
||||
block_count = bitcoind.rpc.getblockcount()
|
||||
block = bitcoind.rpc.generateblock(bitcoind.rpc.getnewaddress(), [], False)
|
||||
@ -283,6 +285,8 @@ def bitcoind_wait_new_block(bitcoind):
|
||||
time.sleep(0.1)
|
||||
continue
|
||||
|
||||
|
||||
@pytest.mark.skipif(not IS_BITCOIND_25, reason="Need 'generateblock' with 'submit=False'")
|
||||
def test_retry_on_workqueue_exceeded(lianad, bitcoind, executor):
|
||||
"""Make sure we retry requests to bitcoind if it is temporarily overloaded."""
|
||||
# Start by reducing the work queue to a single slot. Note we need to stop lianad
|
||||
@ -317,7 +321,7 @@ def test_retry_on_workqueue_exceeded(lianad, bitcoind, executor):
|
||||
"Transient error when sending request to bitcoind.*(status: 503, body: Work queue depth exceeded)",
|
||||
"Retrying RPC request to bitcoind",
|
||||
],
|
||||
timeout=5
|
||||
timeout=5,
|
||||
)
|
||||
except TimeoutError:
|
||||
continue
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user