Search Options

Results per page
Sort
Preferred Languages
Advance

Results 51 - 60 of 237 for withCancel (0.3 sec)

  1. cmd/erasure-metadata-utils_test.go

    	if hashedOrder := hashOrder("This will fail", 0); hashedOrder != nil {
    		t.Errorf("Test: Expect \"nil\" but failed \"%#v\"", hashedOrder)
    	}
    }
    
    func TestShuffleDisks(t *testing.T) {
    	ctx, cancel := context.WithCancel(context.Background())
    	defer cancel()
    
    	nDisks := 16
    	disks, err := getRandomDisks(nDisks)
    	if err != nil {
    		t.Fatal(err)
    	}
    	objLayer, _, err := initObjectLayer(ctx, mustGetPoolEndpoints(0, disks...))
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Thu Jan 18 07:03:17 UTC 2024
    - 7.4K bytes
    - Viewed (0)
  2. src/net/dial_unix_test.go

    			c.Close()
    		}
    	}()
    	defer func() { <-listenerDone }()
    	defer ln.Close()
    
    	sawCancel := make(chan bool, 1)
    	testHookCanceledDial = func() {
    		sawCancel <- true
    	}
    
    	ctx, cancelCtx := context.WithCancel(context.Background())
    
    	connectFunc = func(fd int, addr syscall.Sockaddr) error {
    		err := oldConnectFunc(fd, addr)
    		t.Logf("connect(%d, addr) = %v", fd, err)
    		if err == nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Mar 29 16:24:51 UTC 2022
    - 2.8K bytes
    - Viewed (0)
  3. staging/src/k8s.io/apiserver/pkg/storage/etcd3/watcher_test.go

    // impact.
    // =======================================================================
    
    func TestWatchErrResultNotBlockAfterCancel(t *testing.T) {
    	origCtx, store, _ := testSetup(t)
    	ctx, cancel := context.WithCancel(origCtx)
    	w := store.watcher.createWatchChan(ctx, "/abc", 0, false, false, storage.Everything)
    	// make resultChan and errChan blocking to ensure ordering.
    	w.resultChan = make(chan watch.Event)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 24 18:25:29 UTC 2024
    - 12.3K bytes
    - Viewed (1)
  4. pilot/pkg/status/resourcelock_test.go

    	workers := NewWorkerPool(func(_ *config.Config, _ any) {
    	}, func(resource Resource) *config.Config {
    		return &config.Config{
    			Meta: config.Meta{Generation: 11},
    		}
    	}, 10)
    	ctx, cancel := context.WithCancel(context.Background())
    	workers.Run(ctx)
    	workers.Push(r1, c1, nil)
    	workers.Push(r1, c2, nil)
    	workers.Push(r1, c1, nil)
    	<-x
    	<-y
    	<-x
    	workers.Push(r1, c1, nil)
    	workers.Push(r1a, c1, nil)
    	<-y
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue Oct 31 14:48:28 UTC 2023
    - 2.1K bytes
    - Viewed (0)
  5. staging/src/k8s.io/apiserver/pkg/registry/generic/registry/decorated_watcher.go

    	cancel    context.CancelFunc
    	resultCh  chan watch.Event
    }
    
    func newDecoratedWatcher(ctx context.Context, w watch.Interface, decorator func(runtime.Object)) *decoratedWatcher {
    	ctx, cancel := context.WithCancel(ctx)
    	d := &decoratedWatcher{
    		w:         w,
    		decorator: decorator,
    		cancel:    cancel,
    		resultCh:  make(chan watch.Event),
    	}
    	go d.run(ctx)
    	return d
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jun 02 19:25:31 UTC 2021
    - 2.3K bytes
    - Viewed (1)
  6. pkg/test/util.go

    	t.Cleanup(func() {
    		close(s)
    	})
    	return s
    }
    
    // NewContext returns a context that will automatically be closed when the test is complete
    func NewContext(t Failer) context.Context {
    	ctx, cancel := context.WithCancel(context.Background())
    	t.Cleanup(cancel)
    	return ctx
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri Jan 05 01:20:59 UTC 2024
    - 1.9K bytes
    - Viewed (0)
  7. staging/src/k8s.io/apiserver/pkg/server/filters/timeout_test.go

    		t.Errorf("got unexpected Write error on first request: %v", err)
    	}
    	if record.Count() != 0 {
    		t.Errorf("invoked record method: %#v", record)
    	}
    
    	// Times out
    	ctx, cancel := context.WithCancel(context.Background())
    	cancel()
    	timeout <- time.Time{}
    	res, err = http.Get(ts.URL)
    	if err != nil {
    		t.Fatal(err)
    	}
    	if res.StatusCode != http.StatusGatewayTimeout {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Mar 26 16:28:45 UTC 2024
    - 18.4K bytes
    - Viewed (0)
  8. cmd/metacache-server-pool.go

    	}
    
    	// Do listing in-place.
    	// Create output for our results.
    	// Create filter for results.
    	o.debugln("Raw List", o)
    	filterCh := make(chan metaCacheEntry, o.Limit)
    	listCtx, cancelList := context.WithCancel(ctx)
    	filteredResults := o.gatherResults(listCtx, filterCh)
    	var wg sync.WaitGroup
    	wg.Add(1)
    	var listErr error
    
    	go func(o listPathOptions) {
    		defer wg.Done()
    		o.StopDiskAtLimit = true
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Thu May 23 01:12:23 UTC 2024
    - 12.9K bytes
    - Viewed (0)
  9. pkg/scheduler/framework/plugins/interpodaffinity/plugin_test.go

    			expectedHint: framework.Queue,
    		},
    	}
    	for _, tc := range tests {
    		t.Run(tc.name, func(t *testing.T) {
    			logger, ctx := ktesting.NewTestContext(t)
    			ctx, cancel := context.WithCancel(ctx)
    			defer cancel()
    
    			snapshot := cache.NewSnapshot(nil, nil)
    			pl := plugintesting.SetupPluginWithInformers(ctx, t, New, &config.InterPodAffinityArgs{}, snapshot, namespaces)
    			p := pl.(*InterPodAffinity)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Apr 12 03:08:44 UTC 2024
    - 9.7K bytes
    - Viewed (0)
  10. staging/src/k8s.io/apiserver/pkg/server/filters/priority-and-fairness_test.go

    	return handler
    }
    
    func TestApfSkipLongRunningRequest(t *testing.T) {
    	server := newApfServerWithSingleRequest(t, decisionSkipFilter)
    	defer server.Close()
    
    	ctx, cancel := context.WithCancel(context.Background())
    	defer cancel()
    	StartPriorityAndFairnessWatermarkMaintenance(ctx.Done())
    
    	// send a watch request to test skipping long running request
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Oct 30 12:18:40 UTC 2023
    - 52.6K bytes
    - Viewed (0)
Back to top