From 0c48b1d993d5623896a321a24713c326e63d7947 Mon Sep 17 00:00:00 2001 From: Harshavardhana Date: Fri, 8 Oct 2021 11:37:19 -0700 Subject: [PATCH] fix: benchmarking test initialization > go test -run=none -bench=Benchmark github.com/minio/minio/cmd Runs now without any crashes. fixes #13380 --- cmd/erasure-sets.go | 3 +-- cmd/object-api-listobjects_test.go | 5 +++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/cmd/erasure-sets.go b/cmd/erasure-sets.go index a545ada6b..d902d6a90 100644 --- a/cmd/erasure-sets.go +++ b/cmd/erasure-sets.go @@ -416,8 +416,7 @@ func newErasureSets(ctx context.Context, endpoints Endpoints, storageDisks []Sto continue } if m != i || n != j { - return nil, fmt.Errorf("found a disk in an unexpected location, pool: %d, found (set=%d, disk=%d) expected (set=%d, disk=%d)", - poolIdx, m, n, i, j) + return nil, fmt.Errorf("found a disk in an unexpected location, pool: %d, found (set=%d, disk=%d) expected (set=%d, disk=%d): %s(%s)", poolIdx, m, n, i, j, disk, diskID) } disk.SetDiskLoc(s.poolIndex, m, n) s.endpointStrings[m*setDriveCount+n] = disk.String() diff --git a/cmd/object-api-listobjects_test.go b/cmd/object-api-listobjects_test.go index cc63b7e74..968de6da2 100644 --- a/cmd/object-api-listobjects_test.go +++ b/cmd/object-api-listobjects_test.go @@ -1385,6 +1385,11 @@ func initFSObjectsB(disk string, t *testing.B) (obj ObjectLayer) { if err != nil { t.Fatal("Unexpected err: ", err) } + + newTestConfig(globalMinioDefaultRegion, obj) + + newAllSubsystems() + return obj }