- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 39 for pcancel (0.15 sec)
-
src/database/sql/sql_test.go
db := newTestDB(t, "people") defer closeDB(t, db) ctx, cancel := context.WithCancel(context.Background()) defer cancel() tx, err := db.BeginTx(ctx, nil) if err != nil { t.Fatal(err) } hookTxGrabConn = func() { cancel() // Wait for the context to cancel and tx to rollback. for !tx.isDone() { time.Sleep(pollDuration) } }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 18:42:28 UTC 2024 - 111.6K bytes - Viewed (0) -
pkg/scheduler/framework/runtime/framework_test.go
}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { profile := config.KubeSchedulerProfile{Plugins: tt.plugins} _, ctx := ktesting.NewTestContext(t) ctx, cancel := context.WithCancel(ctx) defer cancel() _, err := newFrameworkWithQueueSortAndBind(ctx, registry, profile) if tt.initErr && err == nil { t.Fatal("Framework initialization should fail") } if !tt.initErr && err != nil {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri May 17 09:07:27 UTC 2024 - 103K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/util/concurrent/FuturesTest.java
} private static void doTestSuccessfulAsList_resultCancelledRacingInputDone() throws Exception { // Simple (combined.cancel -> input.cancel -> setOneValue): successfulAsList(ImmutableList.of(SettableFuture.create())).cancel(true); /* * Complex (combined.cancel -> input.cancel -> other.set -> setOneValue), * to show that this isn't just about problems with the input future we just * cancelled:
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Wed May 29 16:29:37 UTC 2024 - 144.1K bytes - Viewed (0) -
guava-tests/test/com/google/common/util/concurrent/FuturesTest.java
} private static void doTestSuccessfulAsList_resultCancelledRacingInputDone() throws Exception { // Simple (combined.cancel -> input.cancel -> setOneValue): successfulAsList(ImmutableList.of(SettableFuture.create())).cancel(true); /* * Complex (combined.cancel -> input.cancel -> other.set -> setOneValue), * to show that this isn't just about problems with the input future we just * cancelled:
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Wed May 29 16:29:37 UTC 2024 - 144.1K bytes - Viewed (0) -
pkg/scheduler/internal/queue/scheduling_queue_test.go
} func TestPriorityQueue_Add(t *testing.T) { objs := []runtime.Object{medPriorityPodInfo.Pod, unschedulablePodInfo.Pod, highPriorityPodInfo.Pod} logger, ctx := ktesting.NewTestContext(t) ctx, cancel := context.WithCancel(ctx) defer cancel() q := NewTestQueueWithObjects(ctx, newDefaultQueueSort(), objs) if err := q.Add(logger, medPriorityPodInfo.Pod); err != nil { t.Errorf("add failed: %v", err) }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Jun 12 13:26:09 UTC 2024 - 146.9K bytes - Viewed (0) -
cmd/bucket-replication.go
ReplicationARN: tgt.ARN, }, HeaderSize: headerSize, } newCtx := ctx if globalBucketMonitor.IsThrottled(bucket, tgt.ARN) { var cancel context.CancelFunc newCtx, cancel = context.WithTimeout(ctx, throttleDeadline) defer cancel() } r := bandwidth.NewMonitoredReader(newCtx, globalBucketMonitor, gr, opts) if objInfo.isMultipart() {
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Thu Jun 13 06:56:12 UTC 2024 - 114.4K bytes - Viewed (0) -
pkg/scheduler/schedule_one_test.go
client := clientsetfake.NewSimpleClientset(objs...) broadcaster := events.NewBroadcaster(&events.EventSinkImpl{Interface: client.EventsV1()}) ctx, cancel := context.WithCancel(context.Background()) defer cancel() informerFactory := informers.NewSharedInformerFactory(client, 0) sched, err := New( ctx, client, informerFactory, nil, profile.NewRecorderFactory(broadcaster),
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Jun 04 06:20:55 UTC 2024 - 128.1K bytes - Viewed (0) -
src/database/sql/sql.go
} // Schedule the transaction to rollback when the context is canceled. // The cancel function in Tx will be called after done is set to true. ctx, cancel := context.WithCancel(ctx) tx = &Tx{ db: db, dc: dc, releaseConn: release, txi: txi, cancel: cancel, keepConnOnRollback: keepConnOnRollback, ctx: ctx, }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:16:53 UTC 2024 - 103.6K bytes - Viewed (0) -
src/net/http/transport_test.go
func TestTransportProxyHTTPSConnectLeak(t *testing.T) { cancelc := make(chan struct{}) SetTestHookProxyConnectTimeout(t, func(ctx context.Context, timeout time.Duration) (context.Context, context.CancelFunc) { ctx, cancel := context.WithCancel(ctx) go func() { select { case <-cancelc: case <-ctx.Done(): } cancel() }() return ctx, cancel }) defer afterTest(t)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Jun 06 21:59:21 UTC 2024 - 192.6K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/CallTest.kt
callB.cancel() return MockResponse(body = (nextResponse++).toString()) } } callA.enqueue(callback) callB.enqueue(callback) assertThat(server.takeRequest().path).isEqualTo("/a") callback.await(requestA.url).assertBody("A") // At this point we know the callback is ready, and that it will receive a cancel failure.
Registered: Sun Jun 16 04:42:17 UTC 2024 - Last Modified: Wed Apr 10 19:46:48 UTC 2024 - 142.5K bytes - Viewed (2)