mirror of
https://github.com/lightninglabs/loop.git
synced 2026-08-13 12:33:03 +02:00
TestSweepBatcherCloseDuringAdding previously started Batcher.Run in a detached goroutine and called test assertions from that goroutine. The test only waited for the add/cancel workers, so a Run-side shutdown error could be missed or reported unreliably. Route the Run result through a channel and wait for it in the main test goroutine. While waiting, keep draining spend registrations so shutdown cannot deadlock on mock notifier traffic. This makes the existing shutdown-race test cover both sides of the race: AddSweep callers may exit with cancellation, and Batcher.Run must also terminate with an expected shutdown error. |
||
|---|---|---|
| .. | ||
| greedy_batch_selection.go | ||
| greedy_batch_selection_test.go | ||
| log.go | ||
| presigned.go | ||
| presigned_test.go | ||
| store.go | ||
| store_mock.go | ||
| sweep_batch.go | ||
| sweep_batch_test.go | ||
| sweep_batcher.go | ||
| sweep_batcher_presigned_test.go | ||
| sweep_batcher_test.go | ||