From d3c8634df828be8364a62238ab04a64a8e417524 Mon Sep 17 00:00:00 2001 From: "alex.sharov" Date: Tue, 22 Feb 2022 14:44:57 +0700 Subject: [PATCH] fix windows tests --- turbo/snapshotsync/block_snapshots_test.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/turbo/snapshotsync/block_snapshots_test.go b/turbo/snapshotsync/block_snapshots_test.go index 53380127a..dc7d7ce4e 100644 --- a/turbo/snapshotsync/block_snapshots_test.go +++ b/turbo/snapshotsync/block_snapshots_test.go @@ -30,6 +30,7 @@ func createTestSegmentFile(t *testing.T, from, to uint64, name SnapshotType, dir LeafSize: 8, }) require.NoError(t, err) + defer idx.Close() err = idx.AddKey([]byte{1}, 0) require.NoError(t, err) err = idx.Build() @@ -47,6 +48,7 @@ func createTestSegmentFile(t *testing.T, from, to uint64, name SnapshotType, dir require.NoError(t, err) err = idx.Build() require.NoError(t, err) + defer idx.Close() } }