Skip to content

Commit

Permalink
itest+routing: fix flake in runFeeEstimationTestCase
Browse files Browse the repository at this point in the history
The test used 10s as the timeout value, which can easily cause a timeout
in a slow build so we increase it to 60s.
  • Loading branch information
yyforyongyu committed Dec 20, 2024
1 parent 8b8f0c4 commit 4eea207
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion itest/lnd_estimate_route_fee_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
Expand Down Expand Up @@ -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{
Expand Down
2 changes: 1 addition & 1 deletion routing/payment_lifecycle.go
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 4eea207

Please sign in to comment.