Skip to content

Commit caabfb7

Browse files
yyforyongyuRoasbeef
authored andcommitted
itest: cleanup channels for testSwitchOfflineDeliveryOutgoingOffline
1 parent 43b774d commit caabfb7

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

itest/lnd_switch_test.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,7 @@ func testSwitchOfflineDeliveryOutgoingOffline(ht *lntest.HarnessTest) {
264264
// three channels. Note that we won't call the cleanUp function here as
265265
// we will manually stop the node Carol and her channel.
266266
s := setupScenarioFourNodes(ht)
267+
defer s.cleanUp()
267268

268269
// Disconnect the two intermediaries, Alice and Dave, so that when carol
269270
// restarts, the response will be held by Dave.
@@ -296,7 +297,7 @@ func testSwitchOfflineDeliveryOutgoingOffline(ht *lntest.HarnessTest) {
296297
// Shutdown carol and leave her offline for the rest of the test. This
297298
// is critical, as we wish to see if Dave can propragate settles even if
298299
// the outgoing link is never revived.
299-
ht.Shutdown(s.carol)
300+
restartCarol := ht.SuspendNode(s.carol)
300301

301302
// Now restart Dave, ensuring he is both persisting the settles, and is
302303
// able to reforward them to Alice after recovering from a restart.
@@ -339,8 +340,8 @@ func testSwitchOfflineDeliveryOutgoingOffline(ht *lntest.HarnessTest) {
339340
amountPaid+(baseFee*numPayments)*2, int64(0),
340341
)
341342

342-
ht.CloseChannel(s.alice, s.chanPointAliceBob)
343-
ht.CloseChannel(s.dave, s.chanPointDaveAlice)
343+
// Finally, restart Carol so the cleanup process can be finished.
344+
require.NoError(ht, restartCarol())
344345
}
345346

346347
// scenarioFourNodes specifies a scenario which we have a topology that has

0 commit comments

Comments
 (0)