From e8283e958c6c3ea0c2fe73778b89ca66228e85ac Mon Sep 17 00:00:00 2001 From: Mohamed Awnallah Date: Fri, 15 Aug 2025 06:03:34 +0000 Subject: [PATCH] lnwallet/test: make the timeout err msg and actual timeout consistent --- lnwallet/test/test_interface.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lnwallet/test/test_interface.go b/lnwallet/test/test_interface.go index 8dce4892d..853d68a41 100644 --- a/lnwallet/test/test_interface.go +++ b/lnwallet/test/test_interface.go @@ -4,6 +4,7 @@ import ( "bytes" "crypto/sha256" "encoding/hex" + "errors" "fmt" "net" "path/filepath" @@ -2977,7 +2978,7 @@ func waitForMempoolTx(r *rpctest.Harness, txid *chainhash.Hash) error { // Do a short wait select { case <-timeout: - return fmt.Errorf("timeout after 10s") + return errors.New("timeout after 30s") default: } time.Sleep(100 * time.Millisecond) @@ -3008,12 +3009,12 @@ func waitForWalletSync(r *rpctest.Harness, w *lnwallet.LightningWallet) error { bestHash, knownHash *chainhash.Hash bestHeight, knownHeight int32 ) - timeout := time.After(10 * time.Second) + timeout := time.After(30 * time.Second) for !synced { // Do a short wait select { case <-timeout: - return fmt.Errorf("timeout after 30s") + return errors.New("timeout after 30s") case <-time.Tick(100 * time.Millisecond): }