Fix leaked mmap storage in test
This commit is contained in:
parent
12c77bc410
commit
73bdd5a7a4
|
@ -26,8 +26,10 @@ func TestDropTorrentWithMmapStorageWhileHashing(t *testing.T) {
|
||||||
defer cl.Close()
|
defer cl.Close()
|
||||||
|
|
||||||
td, mi := testutil.GreetingTestTorrent()
|
td, mi := testutil.GreetingTestTorrent()
|
||||||
|
mms := storage.NewMMap(td)
|
||||||
|
defer mms.Close()
|
||||||
tt, new, err := cl.AddTorrentSpec(&TorrentSpec{
|
tt, new, err := cl.AddTorrentSpec(&TorrentSpec{
|
||||||
Storage: storage.NewMMap(td),
|
Storage: mms,
|
||||||
InfoHash: mi.HashInfoBytes(),
|
InfoHash: mi.HashInfoBytes(),
|
||||||
InfoBytes: mi.InfoBytes,
|
InfoBytes: mi.InfoBytes,
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue