mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-09-28 19:06:24 +02:00
itest: fix test async_bidirectional_payments
This commit is contained in:
@@ -271,7 +271,7 @@ func runAsyncPayments(ht *lntest.HarnessTest, alice, bob *node.HarnessNode) {
|
|||||||
settled := make(chan struct{})
|
settled := make(chan struct{})
|
||||||
defer close(settled)
|
defer close(settled)
|
||||||
|
|
||||||
timeout := wait.AsyncBenchmarkTimeout * 2
|
timeout := wait.AsyncBenchmarkTimeout
|
||||||
for i := 0; i < numInvoices; i++ {
|
for i := 0; i < numInvoices; i++ {
|
||||||
payReq := bobPayReqs[i]
|
payReq := bobPayReqs[i]
|
||||||
go func() {
|
go func() {
|
||||||
@@ -327,8 +327,21 @@ func testBidirectionalAsyncPayments(ht *lntest.HarnessTest) {
|
|||||||
|
|
||||||
// We use new nodes here as the benchmark test creates lots of data
|
// We use new nodes here as the benchmark test creates lots of data
|
||||||
// which can be costly to be carried on.
|
// which can be costly to be carried on.
|
||||||
alice := ht.NewNode("Alice", []string{"--pending-commit-interval=3m"})
|
args := []string{
|
||||||
bob := ht.NewNode("Bob", []string{"--pending-commit-interval=3m"})
|
// 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.EnsureConnected(alice, bob)
|
||||||
ht.FundCoins(btcutil.SatoshiPerBitcoin, alice)
|
ht.FundCoins(btcutil.SatoshiPerBitcoin, alice)
|
||||||
@@ -375,7 +388,7 @@ func testBidirectionalAsyncPayments(ht *lntest.HarnessTest) {
|
|||||||
settled := make(chan struct{})
|
settled := make(chan struct{})
|
||||||
defer close(settled)
|
defer close(settled)
|
||||||
|
|
||||||
timeout := wait.AsyncBenchmarkTimeout * 4
|
timeout := wait.AsyncBenchmarkTimeout * 2
|
||||||
send := func(node *node.HarnessNode, payReq string) {
|
send := func(node *node.HarnessNode, payReq string) {
|
||||||
req := &routerrpc.SendPaymentRequest{
|
req := &routerrpc.SendPaymentRequest{
|
||||||
PaymentRequest: payReq,
|
PaymentRequest: payReq,
|
||||||
|
@@ -25,7 +25,7 @@ const (
|
|||||||
// AsyncBenchmarkTimeout is the timeout used when running the async
|
// AsyncBenchmarkTimeout is the timeout used when running the async
|
||||||
// payments benchmark. This timeout takes considerably longer on darwin
|
// payments benchmark. This timeout takes considerably longer on darwin
|
||||||
// after go1.12 corrected its use of fsync.
|
// 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
|
// NodeStartTimeout is the timeout value when waiting for a node to
|
||||||
// become fully started.
|
// become fully started.
|
||||||
|
Reference in New Issue
Block a user