Make localLocker lock attempts cancellable (#16510)

This commit is contained in:
Klaus Post
2023-01-31 18:41:17 +01:00
committed by GitHub
parent a24037bfec
commit cdb1b48ad9
2 changed files with 117 additions and 95 deletions

View File

@@ -21,7 +21,6 @@ import (
"context"
"os"
"reflect"
"sync"
"testing"
"github.com/minio/minio/internal/dsync"
@@ -38,10 +37,7 @@ func createLockTestServer(ctx context.Context, t *testing.T) (string, *lockRESTS
}
locker := &lockRESTServer{
ll: &localLocker{
mutex: sync.Mutex{},
lockMap: make(map[string][]lockRequesterInfo),
},
ll: newLocker(),
}
creds := globalActiveCred
token, err := authenticateNode(creds.AccessKey, creds.SecretKey, "")