From 7995e87b91ac88b27fda007535f7ed3eb64b016d Mon Sep 17 00:00:00 2001 From: ziggie Date: Tue, 3 Mar 2026 16:51:09 +0100 Subject: [PATCH] invoices: use longer timeout for HTLC resolution in AMP test Under parallel Postgres test load, the event loop must complete sequential DB writes after SetTime fires. Using testTimeout (5s) is too tight; switch the three blocking hodlChan selects in testFailPartialAMPPayment to testTimeoutLong (1 minute) to match the pattern already used elsewhere for slow backends. --- invoices/invoiceregistry_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/invoices/invoiceregistry_test.go b/invoices/invoiceregistry_test.go index 5e13f8735..785da115e 100644 --- a/invoices/invoiceregistry_test.go +++ b/invoices/invoiceregistry_test.go @@ -2322,7 +2322,7 @@ func testFailPartialAMPPayment(t *testing.T, "expected MPPTimeout, got: %v", failRes.Outcome, ) - case <-time.After(testTimeout): + case <-time.After(testTimeoutLong): t.Fatal("timeout waiting for HTLC resolution") } @@ -2339,7 +2339,7 @@ func testFailPartialAMPPayment(t *testing.T, "expected MPPTimeout, got: %v", failRes.Outcome, ) - case <-time.After(testTimeout): + case <-time.After(testTimeoutLong): t.Fatal("timeout waiting for HTLC resolution") } @@ -2408,7 +2408,7 @@ func testFailPartialAMPPayment(t *testing.T, "expected MPPTimeout, got: %v", failRes.Outcome, ) - case <-time.After(testTimeout): + case <-time.After(testTimeoutLong): t.Fatal("timeout waiting for HTLC resolution") }