[#1510] metabase/test: Fix BenchmarkGet
Fix misplaced `(*DB).Close` (broken after 47dcfa20f3
)
Signed-off-by: Aleksey Savchuk <a.savchuk@yadro.com>
This commit is contained in:
parent
d165ac042c
commit
2af3409d39
1 changed files with 1 additions and 1 deletions
|
@ -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()
|
||||
|
|
Loading…
Reference in a new issue