core: fix TestMemCachedPersist test

Problem:
```
--- FAIL: TestMemCachedPersist (0.07s)
    --- FAIL: TestMemCachedPersist/BoltDBStore (0.07s)
        testing.go:894: TempDir RemoveAll cleanup: remove C:\Users\Anna\AppData\Local\Temp\TestMemCachedPersist_BoltDBStore294966711\001\test_bolt_db: The process cannot access the file because it is being used by another process.
```

Solution:
Release the resources occupied by the DB.
This commit is contained in:
AnnaShaleva 2021-11-17 16:39:05 +03:00 committed by Anna Shaleva
parent 991f1be8e6
commit 06beb4d534

View file

@ -109,6 +109,10 @@ func TestMemCachedPersist(t *testing.T) {
})
t.Run("BoltDBStore", func(t *testing.T) {
ps := newBoltStoreForTesting(t)
t.Cleanup(func() {
err := ps.Close()
require.NoError(t, err)
})
testMemCachedStorePersist(t, ps)
})
}