itest: manage context within HarnessNode
This commit removes the context as a param needed when calling methods of HarnessNode. This change moves the context management inside HarnessNode, aside from saving us a few lines, it makes the context creation/timeout less error-prone.
This commit is contained in:
30 files changed
+186
-309
No files matched your search
@@ -245,11 +245,9 @@ func testSendPaymentAMPInvoiceRepeat(net *lntest.NetworkHarness,
|
||||
Amt: chanAmt,
|
||||
},
|
||||
)
|
||||
ctxt, _ := context.WithTimeout(ctxb, defaultTimeout)
|
||||
err = carol.WaitForNetworkChannelOpen(ctxt, chanPoint)
|
||||
err = carol.WaitForNetworkChannelOpen(chanPoint)
|
||||
require.NoError(t.t, err, "carol didn't report channel")
|
||||
ctxt, _ = context.WithTimeout(ctxb, defaultTimeout)
|
||||
err = dave.WaitForNetworkChannelOpen(ctxt, chanPoint)
|
||||
err = dave.WaitForNetworkChannelOpen(chanPoint)
|
||||
require.NoError(t.t, err, "dave didn't report channel")
|
||||
|
||||
// Create an AMP invoice of a trivial amount, that we'll pay repeatedly
|
||||
|
||||
Reference in new issue
Block a user