mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-01-18 13:27:56 +01:00
pool: replace defer cleanup with t.Cleanup
Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
This commit is contained in:
parent
f8ae8318c6
commit
5e6690107e
@ -71,7 +71,9 @@ func testWorkerPool(t *testing.T, test workerPoolTest) {
|
||||
|
||||
p := test.newPool()
|
||||
startGeneric(t, p)
|
||||
defer stopGeneric(t, p)
|
||||
t.Cleanup(func() {
|
||||
stopGeneric(t, p)
|
||||
})
|
||||
|
||||
submitNonblockingGeneric(t, p, test.numWorkers)
|
||||
})
|
||||
@ -81,7 +83,9 @@ func testWorkerPool(t *testing.T, test workerPoolTest) {
|
||||
|
||||
p := test.newPool()
|
||||
startGeneric(t, p)
|
||||
defer stopGeneric(t, p)
|
||||
t.Cleanup(func() {
|
||||
stopGeneric(t, p)
|
||||
})
|
||||
|
||||
submitBlockingGeneric(t, p, test.numWorkers)
|
||||
})
|
||||
@ -91,7 +95,9 @@ func testWorkerPool(t *testing.T, test workerPoolTest) {
|
||||
|
||||
p := test.newPool()
|
||||
startGeneric(t, p)
|
||||
defer stopGeneric(t, p)
|
||||
t.Cleanup(func() {
|
||||
stopGeneric(t, p)
|
||||
})
|
||||
|
||||
submitPartialBlockingGeneric(t, p, test.numWorkers)
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user