mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-12-08 11:53:16 +01:00
itest: manage context timeout inside network harness
This is the last commit to refactor the context management such that all the timeout are managed inside the network harness.
This commit is contained in:
@@ -464,8 +464,7 @@ func testSwitchOfflineDelivery(net *lntest.NetworkHarness, t *harnessTest) {
|
||||
}
|
||||
|
||||
// First, disconnect Dave and Alice so that their link is broken.
|
||||
ctxt, _ = context.WithTimeout(ctxb, defaultTimeout)
|
||||
if err := net.DisconnectNodes(ctxt, dave, net.Alice); err != nil {
|
||||
if err := net.DisconnectNodes(dave, net.Alice); err != nil {
|
||||
t.Fatalf("unable to disconnect alice from dave: %v", err)
|
||||
}
|
||||
|
||||
@@ -485,8 +484,7 @@ func testSwitchOfflineDelivery(net *lntest.NetworkHarness, t *harnessTest) {
|
||||
|
||||
// Now, disconnect Dave from Alice again before settling back the
|
||||
// payment.
|
||||
ctxt, _ = context.WithTimeout(ctxb, defaultTimeout)
|
||||
if err := net.DisconnectNodes(ctxt, dave, net.Alice); err != nil {
|
||||
if err := net.DisconnectNodes(dave, net.Alice); err != nil {
|
||||
t.Fatalf("unable to disconnect alice from dave: %v", err)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user