[#920] tests: Fix data races

Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
This commit is contained in:
Dmitrii Stepanov 2024-01-18 22:24:34 +03:00
parent e42262a863
commit f5160b27fc
3 changed files with 37 additions and 0 deletions

View file

@ -9,6 +9,7 @@ import (
"git.frostfs.info/TrueCloudLab/frostfs-node/pkg/local_object_storage/pilorama"
cidtest "git.frostfs.info/TrueCloudLab/frostfs-sdk-go/container/id/test"
objectSDK "git.frostfs.info/TrueCloudLab/frostfs-sdk-go/object"
"github.com/stretchr/testify/require"
)
func BenchmarkTreeVsSearch(b *testing.B) {
@ -25,6 +26,10 @@ func BenchmarkTreeVsSearch(b *testing.B) {
func benchmarkTreeVsSearch(b *testing.B, objCount int) {
te := newEngineWithErrorThreshold(b, "", 0)
defer func() {
require.NoError(b, te.ng.Close(context.Background()))
}()
cid := cidtest.ID()
d := pilorama.CIDDescriptor{CID: cid, Position: 0, Size: 1}
treeID := "someTree"