disable connectDisks loop under testing (#14920)

avoids races during tests, keeps tests predictable
This commit is contained in:
Harshavardhana
2022-05-16 05:36:00 -07:00
committed by GitHub
parent b0e2c2da78
commit 03f8b25b50
3 changed files with 9 additions and 1 deletions
+3 -1
View File
@@ -485,7 +485,9 @@ func newErasureSets(ctx context.Context, endpoints PoolEndpoints, storageDisks [
go s.cleanupDeletedObjects(ctx)
// Start the disk monitoring and connect routine.
go s.monitorAndConnectEndpoints(ctx, defaultMonitorConnectEndpointInterval)
if !globalIsTesting {
go s.monitorAndConnectEndpoints(ctx, defaultMonitorConnectEndpointInterval)
}
return s, nil
}