itest: fix test async_bidirectional_payments

This commit is contained in:
yyforyongyu 2022-10-20 19:55:19 +08:00
parent 9d1d629001
commit 8b9ccfe310
No known key found for this signature in database
GPG Key ID: 9BCD95C4FF296868
2 changed files with 18 additions and 5 deletions

View File

@ -271,7 +271,7 @@ func runAsyncPayments(ht *lntest.HarnessTest, alice, bob *node.HarnessNode) {
settled := make(chan struct{})
defer close(settled)
timeout := wait.AsyncBenchmarkTimeout * 2
timeout := wait.AsyncBenchmarkTimeout
for i := 0; i < numInvoices; i++ {
payReq := bobPayReqs[i]
go func() {
@ -327,8 +327,21 @@ func testBidirectionalAsyncPayments(ht *lntest.HarnessTest) {
// We use new nodes here as the benchmark test creates lots of data
// which can be costly to be carried on.
alice := ht.NewNode("Alice", []string{"--pending-commit-interval=3m"})
bob := ht.NewNode("Bob", []string{"--pending-commit-interval=3m"})
args := []string{
// Increase the dust threshold to avoid the payments fail due
// to threshold limit reached.
"--dust-threshold=5000000",
// Increase the pending commit interval since there are lots of
// commitment dances.
"--pending-commit-interval=5m",
// Increase the mailbox delivery timeout as there are lots of
// ADDs going on.
"--htlcswitch.mailboxdeliverytimeout=2m",
}
alice := ht.NewNode("Alice", args)
bob := ht.NewNode("Bob", args)
ht.EnsureConnected(alice, bob)
ht.FundCoins(btcutil.SatoshiPerBitcoin, alice)
@ -375,7 +388,7 @@ func testBidirectionalAsyncPayments(ht *lntest.HarnessTest) {
settled := make(chan struct{})
defer close(settled)
timeout := wait.AsyncBenchmarkTimeout * 4
timeout := wait.AsyncBenchmarkTimeout * 2
send := func(node *node.HarnessNode, payReq string) {
req := &routerrpc.SendPaymentRequest{
PaymentRequest: payReq,

View File

@ -25,7 +25,7 @@ const (
// AsyncBenchmarkTimeout is the timeout used when running the async
// payments benchmark. This timeout takes considerably longer on darwin
// after go1.12 corrected its use of fsync.
AsyncBenchmarkTimeout = time.Minute * 3
AsyncBenchmarkTimeout = time.Minute * 5
// NodeStartTimeout is the timeout value when waiting for a node to
// become fully started.