Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 39 for cancel0 (0.29 sec)

  1. src/database/sql/sql_test.go

    		}
    		if index == 2 && err != context.Canceled {
    			t.Fatalf("Scan: %v; want context.Canceled", err)
    		}
    		got = append(got, r)
    		index++
    	}
    	select {
    	case <-ctx.Done():
    		if err := ctx.Err(); err != context.Canceled {
    			t.Fatalf("context err = %v; want context.Canceled", err)
    		}
    	default:
    		t.Fatalf("context err = nil; want context.Canceled")
    	}
    	want := []row{
    		{age: 1, name: "Alice"},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 18:42:28 UTC 2024
    - 111.6K bytes
    - Viewed (0)
  2. 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)
  3. okhttp/src/test/java/okhttp3/CallTest.kt

            override fun dispatch(request: RecordedRequest): MockResponse {
              call.cancel()
              return MockResponse(body = "A")
            }
          }
        call.enqueue(callback)
        assertThat(server.takeRequest().path).isEqualTo("/a")
        callback.await(requestA.url).assertFailure(
          "Canceled",
          "stream was reset: CANCEL",
          "Socket closed",
        )
      }
    
      @Test
    Registered: Sun Jun 16 04:42:17 UTC 2024
    - Last Modified: Wed Apr 10 19:46:48 UTC 2024
    - 142.5K bytes
    - Viewed (0)
  4. 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)
  5. 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)
  6. 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)
  7. 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)
  8. 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)
  9. cmd/admin-handlers.go

    	ctx, cancel := context.WithCancel(r.Context())
    	defer cancel()
    
    	objectAPI, _ := validateAdminReq(ctx, w, r, policy.HealthInfoAdminAction)
    	if objectAPI == nil {
    		return
    	}
    
    	// Freeze all incoming S3 API calls before running speedtest.
    	globalNotificationSys.ServiceFreeze(ctx, true)
    
    	// Unfreeze as soon as request context is canceled or when the function returns.
    	go func() {
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri May 24 23:05:23 UTC 2024
    - 98K bytes
    - Viewed (0)
  10. 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)
Back to top