mirror of
https://github.com/pgsty/minio.git
synced 2026-08-07 08:11:13 +03:00
fix: use per test context (#9343)
Instead of GlobalContext use a local context for tests. Most notably this allows stuff created to be shut down when tests using it is done. After PR #9345 9331 CI is often running out of memory/time.
This commit is contained in:
@@ -18,13 +18,17 @@ package cmd
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"context"
|
||||
"os"
|
||||
"testing"
|
||||
)
|
||||
|
||||
// Tests for if parent directory is object
|
||||
func TestXLParentDirIsObject(t *testing.T) {
|
||||
obj, fsDisks, err := prepareXL16()
|
||||
ctx, cancel := context.WithCancel(context.Background())
|
||||
defer cancel()
|
||||
|
||||
obj, fsDisks, err := prepareXL16(ctx)
|
||||
if err != nil {
|
||||
t.Fatalf("Unable to initialize 'XL' object layer.")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user