- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 237 for withCancel (0.29 sec)
-
cni/pkg/nodeagent/net_test.go
UID: "123", }, Spec: corev1.PodSpec{ Containers: containers, }, Status: podStatus, } } func TestServerAddPod(t *testing.T) { ctx, cancel := context.WithCancel(context.Background()) defer cancel() setupLogging() fixture := getTestFixure(ctx) netServer := fixture.netServer ztunnelServer := fixture.ztunnelServer podMeta := metav1.ObjectMeta{ Name: "foo",
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Thu Jun 06 05:10:23 UTC 2024 - 17.8K bytes - Viewed (0) -
cmd/server-startup-msg_test.go
t.Fatalf("Expected %#v, got %#v", apiEndpoints, newAPIEndpoints) } } // Test printing server common message. func TestPrintServerCommonMessage(t *testing.T) { ctx, cancel := context.WithCancel(context.Background()) defer cancel() obj, fsDir, err := prepareFS(ctx) if err != nil { t.Fatal(err) } defer os.RemoveAll(fsDir) if err = newTestConfig(globalMinioDefaultRegion, obj); err != nil {
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Tue Jun 20 00:53:08 UTC 2023 - 4K bytes - Viewed (0) -
src/cmd/vendor/golang.org/x/tools/go/analysis/passes/lostcancel/lostcancel.go
return true } stack = append(stack, n) // push // Look for [{AssignStmt,ValueSpec} CallExpr SelectorExpr]: // // ctx, cancel := context.WithCancel(...) // ctx, cancel = context.WithCancel(...) // var ctx, cancel = context.WithCancel(...) // if !isContextWithCancel(pass.TypesInfo, n) || !isCall(stack[len(stack)-2]) { return true } var id *ast.Ident // id of cancel var
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Jan 22 19:00:13 UTC 2024 - 9K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/util/flowcontrol/fairqueuing/promise/promise_test.go
package promise import ( "context" "testing" "time" "k8s.io/apimachinery/pkg/util/wait" ) func TestWriteOnceSet(t *testing.T) { oldTime := time.Now() cval := &oldTime ctx, cancel := context.WithCancel(context.Background()) wr := NewWriteOnce(nil, ctx, cval) gots := make(chan interface{}) goGetExpectNotYet(t, wr, gots, "Set") now := time.Now() aval := &now if !wr.Set(aval) { t.Error("Set() returned false")
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Mon Aug 21 19:19:31 UTC 2023 - 3K bytes - Viewed (0) -
src/cmd/vendor/golang.org/x/sync/errgroup/pre_go120.go
// license that can be found in the LICENSE file. //go:build !go1.20 package errgroup import "context" func withCancelCause(parent context.Context) (context.Context, func(error)) { ctx, cancel := context.WithCancel(parent) return ctx, func(error) { cancel() }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Mar 04 17:57:25 UTC 2024 - 377 bytes - Viewed (0) -
src/context/context.go
// calls between them must propagate the Context, optionally replacing // it with a derived Context created using [WithCancel], [WithDeadline], // [WithTimeout], or [WithValue]. When a Context is canceled, all // Contexts derived from it are also canceled. // // The [WithCancel], [WithDeadline], and [WithTimeout] functions take a // Context (the parent) and return a derived Context (the child) and a
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Mar 26 19:58:28 UTC 2024 - 23.7K bytes - Viewed (0) -
cmd/erasure-object_test.go
"runtime" "strconv" "testing" "github.com/dustin/go-humanize" "github.com/minio/minio/internal/config/storageclass" ) func TestRepeatPutObjectPart(t *testing.T) { ctx, cancel := context.WithCancel(context.Background()) defer cancel() var objLayer ObjectLayer var disks []string var err error var opts ObjectOptions objLayer, disks, err = prepareErasure16(ctx) if err != nil { t.Fatal(err)
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Tue Jan 30 20:43:25 UTC 2024 - 36.8K bytes - Viewed (0) -
internal/cachevalue/cache_test.go
return time.Now(), slowCaller(ctx) }, ) ctx, cancel := context.WithCancel(context.Background()) cancel() // cancel context to test. _, err := cache.GetWithCtx(ctx) if !errors.Is(err, context.Canceled) { t.Fatalf("expected context.Canceled err, got %v", err) } ctx, cancel = context.WithCancel(context.Background()) defer cancel() t1, err := cache.GetWithCtx(ctx) if err != nil {
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Thu May 09 00:51:34 UTC 2024 - 2.7K bytes - Viewed (0) -
internal/dsync/drwmutex_test.go
drwm1 := NewDRWMutex(ds, "simplelock") ctx1, cancel1 := context.WithCancel(context.Background()) if !drwm1.GetRLock(ctx1, cancel1, id, source, Options{Timeout: time.Second}) { panic("Failed to acquire read lock") } // fmt.Println("1st read lock acquired, waiting...") drwm2 := NewDRWMutex(ds, "simplelock") ctx2, cancel2 := context.WithCancel(context.Background())
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Sat Dec 24 03:49:07 UTC 2022 - 9.7K bytes - Viewed (0) -
cni/pkg/nodeagent/ztunnelserver_test.go
) var ztunnelTestCounter atomic.Uint32 func TestZtunnelSendsPodSnapshot(t *testing.T) { ztunnelKeepAliveCheckInterval = time.Second / 10 mt := monitortest.New(t) setupLogging() ctx, cancel := context.WithCancel(context.Background()) defer cancel() fixture := connect(ctx) ztunClient := fixture.ztunClient uid := fixture.uid m, fds := readRequest(t, ztunClient)
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Fri Apr 12 21:47:31 UTC 2024 - 8.6K bytes - Viewed (0)