2
0
mirror of synced 2025-02-22 13:48:21 +00:00

Fix leaked mmap storage in test

This commit is contained in:
Matt Joiner 2021-12-16 11:41:31 +11:00
parent 12c77bc410
commit 73bdd5a7a4

View File

@ -26,8 +26,10 @@ func TestDropTorrentWithMmapStorageWhileHashing(t *testing.T) {
defer cl.Close()
td, mi := testutil.GreetingTestTorrent()
mms := storage.NewMMap(td)
defer mms.Close()
tt, new, err := cl.AddTorrentSpec(&TorrentSpec{
Storage: storage.NewMMap(td),
Storage: mms,
InfoHash: mi.HashInfoBytes(),
InfoBytes: mi.InfoBytes,
})