mirror of
https://github.com/minio/minio.git
synced 2025-01-11 15:03:22 -05:00
disable connectDisks loop under testing (#14920)
avoids races during tests, keeps tests predictable
This commit is contained in:
parent
b0e2c2da78
commit
03f8b25b50
@ -485,7 +485,9 @@ func newErasureSets(ctx context.Context, endpoints PoolEndpoints, storageDisks [
|
|||||||
go s.cleanupDeletedObjects(ctx)
|
go s.cleanupDeletedObjects(ctx)
|
||||||
|
|
||||||
// Start the disk monitoring and connect routine.
|
// Start the disk monitoring and connect routine.
|
||||||
go s.monitorAndConnectEndpoints(ctx, defaultMonitorConnectEndpointInterval)
|
if !globalIsTesting {
|
||||||
|
go s.monitorAndConnectEndpoints(ctx, defaultMonitorConnectEndpointInterval)
|
||||||
|
}
|
||||||
|
|
||||||
return s, nil
|
return s, nil
|
||||||
}
|
}
|
||||||
|
@ -139,6 +139,9 @@ var (
|
|||||||
// Indicates if the running minio is in gateway mode.
|
// Indicates if the running minio is in gateway mode.
|
||||||
globalIsGateway = false
|
globalIsGateway = false
|
||||||
|
|
||||||
|
// Indicates if server code should go through testing path.
|
||||||
|
globalIsTesting = false
|
||||||
|
|
||||||
// Name of gateway server, e.g S3, NAS etc
|
// Name of gateway server, e.g S3, NAS etc
|
||||||
globalGatewayName = ""
|
globalGatewayName = ""
|
||||||
|
|
||||||
|
@ -73,6 +73,9 @@ import (
|
|||||||
func TestMain(m *testing.M) {
|
func TestMain(m *testing.M) {
|
||||||
flag.Parse()
|
flag.Parse()
|
||||||
|
|
||||||
|
// set to 'true' when testing is invoked
|
||||||
|
globalIsTesting = true
|
||||||
|
|
||||||
globalActiveCred = auth.Credentials{
|
globalActiveCred = auth.Credentials{
|
||||||
AccessKey: auth.DefaultAccessKey,
|
AccessKey: auth.DefaultAccessKey,
|
||||||
SecretKey: auth.DefaultSecretKey,
|
SecretKey: auth.DefaultSecretKey,
|
||||||
|
Loading…
Reference in New Issue
Block a user