Fix TestDataUpdateTracker hanging (#10302)

Keep dataUpdateTracker while goroutine is starting.

This will ensure the object is updated one `start` returns

Tested with

```
λ go test -cpu=1,2,4,8 -test.run TestDataUpdateTracker -count=1000
PASS
ok      github.com/minio/minio/cmd      8.913s
```

Fixes #10295
This commit is contained in:
Klaus Post
2020-08-20 13:17:42 -07:00
committed by GitHub
parent 59352d0ac2
commit 8e6787a302
3 changed files with 8 additions and 6 deletions

View File

@@ -80,7 +80,7 @@ func newErasureZones(ctx context.Context, endpointZones EndpointZones) (ObjectLa
}
}
go intDataUpdateTracker.start(GlobalContext, localDrives...)
go intDataUpdateTracker.start(ctx, localDrives...)
return z, nil
}