From 14f202941e637ae6fffcdf087c7d230d82ed7212 Mon Sep 17 00:00:00 2001 From: f321x Date: Wed, 22 Apr 2026 18:00:52 +0200 Subject: [PATCH] regtest: increase timeouts 30s -> 120s I suspect the timeouts are a bit too short for the slow ci machine. --- tests/regtest/regtest.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/regtest/regtest.sh b/tests/regtest/regtest.sh index 9bd5a9e0e..61873dc67 100755 --- a/tests/regtest/regtest.sh +++ b/tests/regtest/regtest.sh @@ -22,7 +22,7 @@ function wait_until_htlcs_settled() { msg="wait until $1's local_unsettled_sent is zero" cmd="./run_electrum --regtest -D /tmp/$1" - declare -i timeout_sec=30 + declare -i timeout_sec=120 declare -i elapsed_sec=0 while unsettled=$($cmd list_channels | jq '.[] | .local_unsettled_sent') && [ $unsettled != "0" ]; do @@ -44,7 +44,7 @@ function wait_for_balance() { msg="wait until $1's balance reaches $2" cmd="./run_electrum --regtest -D /tmp/$1" - declare -i timeout_sec=30 + declare -i timeout_sec=120 declare -i elapsed_sec=0 while balance=$($cmd getbalance | jq '[.confirmed, .unconfirmed] | to_entries | map(select(.value != null).value) | map(tonumber) | add ') && (( $(echo "$balance < $2" | bc -l) )); do @@ -65,7 +65,7 @@ function wait_until_channel_open() { msg="wait until $1 sees channel open" cmd="./run_electrum --regtest -D /tmp/$1" - declare -i timeout_sec=30 + declare -i timeout_sec=120 declare -i elapsed_sec=0 while channel_state=$($cmd list_channels | jq '.[0] | .state' | tr -d '"') && [ $channel_state != "OPEN" ]; do @@ -86,7 +86,7 @@ function wait_until_channel_closed() { msg="wait until $1 sees channel closed" cmd="./run_electrum --regtest -D /tmp/$1" - declare -i timeout_sec=30 + declare -i timeout_sec=120 declare -i elapsed_sec=0 while [[ $($cmd list_channels | jq '.[0].state' | tr -d '"') != "CLOSED" ]]; do @@ -107,7 +107,7 @@ function wait_until_preimage() { msg="wait until $1 has preimage for $2" cmd="./run_electrum --regtest -D /tmp/$1" - declare -i timeout_sec=30 + declare -i timeout_sec=120 declare -i elapsed_sec=0 while [[ $($cmd get_invoice $2 | jq '.preimage' | tr -d '"') == "null" ]]; do @@ -127,7 +127,7 @@ function wait_until_preimage() function wait_until_spent() { msg="wait until $1:$2 is spent" - declare -i timeout_sec=30 + declare -i timeout_sec=120 declare -i elapsed_sec=0 while [[ $($bitcoin_cli gettxout $1 $2) ]]; do