itest: fix commitment_deadline context expired flake
This commit is contained in:
1 file changed
+4
-3
@@ -94,9 +94,6 @@ func testCommitmentTransactionDeadline(net *lntest.NetworkHarness,
|
|||||||
// calculateSweepFeeRate runs multiple steps to calculate the fee rate
|
// calculateSweepFeeRate runs multiple steps to calculate the fee rate
|
||||||
// used in sweeping the transactions.
|
// used in sweeping the transactions.
|
||||||
calculateSweepFeeRate := func(expectedSweepTxNum int) int64 {
|
calculateSweepFeeRate := func(expectedSweepTxNum int) int64 {
|
||||||
ctxt, cancel := context.WithTimeout(ctxb, defaultTimeout)
|
|
||||||
defer cancel()
|
|
||||||
|
|
||||||
// Create two nodes, Alice and Bob.
|
// Create two nodes, Alice and Bob.
|
||||||
alice := setupNode("Alice")
|
alice := setupNode("Alice")
|
||||||
defer shutdownAndAssert(net, t, alice)
|
defer shutdownAndAssert(net, t, alice)
|
||||||
@@ -118,6 +115,8 @@ func testCommitmentTransactionDeadline(net *lntest.NetworkHarness,
|
|||||||
// Send a payment with a specified finalCTLVDelta, which will
|
// Send a payment with a specified finalCTLVDelta, which will
|
||||||
// be used as our deadline later on when Alice force closes the
|
// be used as our deadline later on when Alice force closes the
|
||||||
// channel.
|
// channel.
|
||||||
|
ctxt, cancel := context.WithTimeout(ctxb, defaultTimeout)
|
||||||
|
defer cancel()
|
||||||
_, err := alice.RouterClient.SendPaymentV2(
|
_, err := alice.RouterClient.SendPaymentV2(
|
||||||
ctxt, &routerrpc.SendPaymentRequest{
|
ctxt, &routerrpc.SendPaymentRequest{
|
||||||
Dest: bob.PubKey[:],
|
Dest: bob.PubKey[:],
|
||||||
@@ -145,6 +144,8 @@ func testCommitmentTransactionDeadline(net *lntest.NetworkHarness,
|
|||||||
// Now that the channel has been force closed, it should show
|
// Now that the channel has been force closed, it should show
|
||||||
// up in the PendingChannels RPC under the waiting close
|
// up in the PendingChannels RPC under the waiting close
|
||||||
// section.
|
// section.
|
||||||
|
ctxt, cancel = context.WithTimeout(ctxb, defaultTimeout)
|
||||||
|
defer cancel()
|
||||||
pendingChansRequest := &lnrpc.PendingChannelsRequest{}
|
pendingChansRequest := &lnrpc.PendingChannelsRequest{}
|
||||||
pendingChanResp, err := alice.PendingChannels(
|
pendingChanResp, err := alice.PendingChannels(
|
||||||
ctxt, pendingChansRequest,
|
ctxt, pendingChansRequest,
|
||||||
|
|||||||
Reference in new issue
Block a user