[#1510] metabase/test: Fix BenchmarkGet

Fix misplaced `(*DB).Close`

Signed-off-by: Aleksey Savchuk <a.savchuk@yadro.com>
This commit is contained in:
Aleksey Savchuk 2024-12-13 12:59:35 +03:00
parent d165ac042c
commit d6fedfbd62
Signed by: a-savchuk
GPG key ID: 70C0A7FF6F9C4639

View file

@ -219,7 +219,6 @@ func benchmarkGet(b *testing.B, numOfObj int) {
meta.WithMaxBatchSize(batchSize),
meta.WithMaxBatchDelay(10*time.Millisecond),
)
defer func() { require.NoError(b, db.Close(context.Background())) }()
addrs := make([]oid.Address, 0, numOfObj)
for range numOfObj {
@ -234,6 +233,7 @@ func benchmarkGet(b *testing.B, numOfObj int) {
}
db, addrs := prepareDb(runtime.NumCPU())
defer func() { require.NoError(b, db.Close(context.Background())) }()
b.Run("parallel", func(b *testing.B) {
b.ReportAllocs()