From 06beb4d5349dd70259b719665a14e8a1b33dd938 Mon Sep 17 00:00:00 2001 From: AnnaShaleva Date: Wed, 17 Nov 2021 16:39:05 +0300 Subject: [PATCH] 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. --- pkg/core/storage/memcached_store_test.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg/core/storage/memcached_store_test.go b/pkg/core/storage/memcached_store_test.go index 216c6b8e7..eb572d48f 100644 --- a/pkg/core/storage/memcached_store_test.go +++ b/pkg/core/storage/memcached_store_test.go @@ -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) }) }