Search Options

Results per page
Sort
Preferred Languages
Advance

Results 81 - 90 of 237 for withCancel (4.33 sec)

  1. src/cmd/go/go_unix_test.go

    	}
    	// Don't run this test in parallel, for the same reason.
    
    	tg := testgo(t)
    	defer tg.cleanup()
    	tg.setenv("GOROOT", testGOROOT)
    
    	ctx, cancel := context.WithCancel(context.Background())
    	cmd := testenv.CommandContext(t, ctx, tg.goTool(), "test", "std", "-short", "-count=1")
    	cmd.Dir = tg.execDir
    
    	// Override $TMPDIR when running the tests: since we're terminating the tests
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Sep 19 16:17:55 UTC 2023
    - 3.5K bytes
    - Viewed (0)
  2. cmd/kubelet/app/auth.go

    		// generate a context from stopCh. This is to avoid modifying files which are relying on this method
    		// TODO: See if we can pass ctx to the current method
    		ctx, cancel := context.WithCancel(context.Background())
    		go func() {
    			select {
    			case <-stopCh:
    				cancel() // stopCh closed, so cancel our context
    			case <-ctx.Done():
    			}
    		}()
    		if dynamicCAContentFromFile != nil {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Mar 07 14:37:01 UTC 2022
    - 5K bytes
    - Viewed (0)
  3. src/cmd/vet/doc.go

    	ifaceassert      detect impossible interface-to-interface type assertions
    	loopclosure      check references to loop variables from within nested functions
    	lostcancel       check cancel func returned by context.WithCancel is called
    	nilfunc          check for useless comparisons between functions and nil
    	printf           check consistency of Printf format strings and arguments
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Nov 21 00:17:30 UTC 2023
    - 3.8K bytes
    - Viewed (0)
  4. staging/src/k8s.io/apiserver/plugin/pkg/authorizer/webhook/metrics_test.go

    			expectFailOpenResult:         "error",
    			wantErr:                      true,
    		},
    	}
    
    	for _, scenario := range scenarios {
    		t.Run(scenario.name, func(t *testing.T) {
    			ctx, cancel := context.WithCancel(context.Background())
    			defer cancel()
    
    			service := new(mockV1Service)
    			service.statusCode = scenario.authzFakeServiceStatusCode
    			if service.statusCode == 0 {
    				service.statusCode = 200
    			}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Mar 04 19:01:15 UTC 2024
    - 6.6K bytes
    - Viewed (0)
  5. internal/grid/muxserver.go

    	var cancel context.CancelFunc
    	ctx = setCaller(ctx, c.remote)
    	if msg.DeadlineMS > 0 {
    		ctx, cancel = context.WithTimeout(ctx, time.Duration(msg.DeadlineMS)*time.Millisecond)
    	} else {
    		ctx, cancel = context.WithCancel(ctx)
    	}
    	m := muxServer{
    		ID:        msg.MuxID,
    		RecvSeq:   msg.Seq + 1,
    		SendSeq:   msg.Seq,
    		ctx:       ctx,
    		cancel:    cancel,
    		parent:    c,
    		LastPing:  time.Now().Unix(),
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri Jun 07 15:51:52 UTC 2024
    - 9.7K bytes
    - Viewed (0)
  6. cmd/erasure-healing-common_test.go

    		}
    	}
    }
    
    // TestListOnlineDisks - checks if listOnlineDisks and outDatedDisks
    // are consistent with each other.
    func TestListOnlineDisks(t *testing.T) {
    	ctx, cancel := context.WithCancel(context.Background())
    	defer cancel()
    
    	obj, disks, err := prepareErasure16(ctx)
    	if err != nil {
    		t.Fatalf("Prepare Erasure backend failed - %v", err)
    	}
    	setObjectLayer(obj)
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Mon Jun 10 15:51:27 UTC 2024
    - 23K bytes
    - Viewed (0)
  7. pkg/scheduler/profile/profile_test.go

    				},
    			},
    			wantErr: "at least one bind plugin is needed",
    		},
    	}
    	for _, tc := range cases {
    		t.Run(tc.name, func(t *testing.T) {
    			_, ctx := ktesting.NewTestContext(t)
    			ctx, cancel := context.WithCancel(ctx)
    			defer cancel()
    			m, err := NewMap(ctx, tc.cfgs, fakeRegistry, nilRecorderFactory)
    			if err := checkErr(err, tc.wantErr); err != nil {
    				t.Fatal(err)
    			}
    			if len(tc.wantErr) != 0 {
    				return
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Sep 20 09:49:54 UTC 2023
    - 6.6K bytes
    - Viewed (0)
  8. staging/src/k8s.io/apiserver/pkg/storage/cacher/ready_test.go

    		t.Errorf("expected error waiting on a stopped state")
    	}
    }
    
    func Test_newReadyCancelPending(t *testing.T) {
    	errCh := make(chan error, 10)
    	ready := newReady()
    	ready.set(false)
    	ctx, cancel := context.WithCancel(context.Background())
    	// create 10 goroutines stuck on pending
    	for i := 0; i < 10; i++ {
    		go func() {
    			errCh <- ready.wait(ctx)
    		}()
    	}
    	select {
    	case <-time.After(1 * time.Second):
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Mar 16 13:32:11 UTC 2023
    - 4.6K bytes
    - Viewed (0)
  9. internal/dsync/dsync_test.go

    	if testing.Short() {
    		t.Skip("skipping test in short mode.")
    	}
    
    	dm := NewDRWMutex(ds, "aap")
    	dm.refreshInterval = testDrwMutexRefreshInterval
    
    	ctx, cancel := context.WithCancel(context.Background())
    
    	if !dm.GetLock(ctx, cancel, id, source, Options{Timeout: 5 * time.Minute}) {
    		t.Fatal("GetLock() should be successful")
    	}
    
    	// Make it run twice.
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Sat Dec 24 03:49:07 UTC 2022
    - 11K bytes
    - Viewed (0)
  10. cmd/handler-utils_test.go

    	"os"
    	"reflect"
    	"testing"
    
    	"github.com/minio/minio/internal/config"
    )
    
    // Tests validate bucket LocationConstraint.
    func TestIsValidLocationConstraint(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: Thu Feb 22 06:26:06 UTC 2024
    - 6.1K bytes
    - Viewed (0)
Back to top