Skip to content

Commit fb1adfc

Browse files
authored
Merge pull request #10160 from mohamedawnallah/increase-wait-wallet-sync-timeout
lnwallet/test: increase wait for wallet to sync to `30s` to match with the returned error in case of timeout
2 parents 365f178 + e8283e9 commit fb1adfc

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

lnwallet/test/test_interface.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import (
44
"bytes"
55
"crypto/sha256"
66
"encoding/hex"
7+
"errors"
78
"fmt"
89
"net"
910
"path/filepath"
@@ -2977,7 +2978,7 @@ func waitForMempoolTx(r *rpctest.Harness, txid *chainhash.Hash) error {
29772978
// Do a short wait
29782979
select {
29792980
case <-timeout:
2980-
return fmt.Errorf("timeout after 10s")
2981+
return errors.New("timeout after 30s")
29812982
default:
29822983
}
29832984
time.Sleep(100 * time.Millisecond)
@@ -3008,12 +3009,12 @@ func waitForWalletSync(r *rpctest.Harness, w *lnwallet.LightningWallet) error {
30083009
bestHash, knownHash *chainhash.Hash
30093010
bestHeight, knownHeight int32
30103011
)
3011-
timeout := time.After(10 * time.Second)
3012+
timeout := time.After(30 * time.Second)
30123013
for !synced {
30133014
// Do a short wait
30143015
select {
30153016
case <-timeout:
3016-
return fmt.Errorf("timeout after 30s")
3017+
return errors.New("timeout after 30s")
30173018
case <-time.Tick(100 * time.Millisecond):
30183019
}
30193020

0 commit comments

Comments
 (0)