From 4eea2078fb7b89afd525900f3718d89c631cb77a Mon Sep 17 00:00:00 2001 From: yyforyongyu Date: Sun, 3 Nov 2024 13:19:19 +0800 Subject: [PATCH] itest+routing: fix flake in `runFeeEstimationTestCase` The test used 10s as the timeout value, which can easily cause a timeout in a slow build so we increase it to 60s. --- itest/lnd_estimate_route_fee_test.go | 3 ++- routing/payment_lifecycle.go | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/itest/lnd_estimate_route_fee_test.go b/itest/lnd_estimate_route_fee_test.go index 028697685..80d19fc04 100644 --- a/itest/lnd_estimate_route_fee_test.go +++ b/itest/lnd_estimate_route_fee_test.go @@ -9,6 +9,7 @@ import ( "github.com/lightningnetwork/lnd/lnrpc/routerrpc" "github.com/lightningnetwork/lnd/lntest" "github.com/lightningnetwork/lnd/lntest/node" + "github.com/lightningnetwork/lnd/lntest/wait" "github.com/lightningnetwork/lnd/routing" "github.com/stretchr/testify/require" ) @@ -376,7 +377,7 @@ func runFeeEstimationTestCase(ht *lntest.HarnessTest, ) feeReq = &routerrpc.RouteFeeRequest{ PaymentRequest: payReqs[0], - Timeout: 10, + Timeout: uint32(wait.PaymentTimeout.Seconds()), } } else { feeReq = &routerrpc.RouteFeeRequest{ diff --git a/routing/payment_lifecycle.go b/routing/payment_lifecycle.go index 34de74461..180d38a63 100644 --- a/routing/payment_lifecycle.go +++ b/routing/payment_lifecycle.go @@ -348,7 +348,7 @@ func (p *paymentLifecycle) checkContext(ctx context.Context) error { if errors.Is(ctx.Err(), context.DeadlineExceeded) { reason = channeldb.FailureReasonTimeout log.Warnf("Payment attempt not completed before "+ - "timeout, id=%s", p.identifier.String()) + "context timeout, id=%s", p.identifier.String()) } else { reason = channeldb.FailureReasonCanceled log.Warnf("Payment attempt context canceled, id=%s",