mirror of
https://github.com/minio/minio.git
synced 2026-02-04 18:00:15 -05:00
tests: Add context cancelation (#15374)
A huge number of goroutines would build up from various monitors When creating test filesystems provide a context so they can shut down when no longer needed.
This commit is contained in:
@@ -34,7 +34,10 @@ import (
|
||||
|
||||
// Tests validate bucket LocationConstraint.
|
||||
func TestIsValidLocationContraint(t *testing.T) {
|
||||
obj, fsDir, err := prepareFS()
|
||||
ctx, cancel := context.WithCancel(context.Background())
|
||||
defer cancel()
|
||||
|
||||
obj, fsDir, err := prepareFS(ctx)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user