Search Options

Results per page
Sort
Preferred Languages
Advance

Results 61 - 70 of 5,360 for watt (0.06 sec)

  1. src/net/http/transport_test.go

    		res.Body.Close()
    		t.Errorf("unexpected success")
    	}
    
    	r := <-reqc
    	if got, want := r.Header.Get("User-Agent"), "foo"; got != want {
    		t.Errorf("CONNECT request User-Agent = %q; want %q", got, want)
    	}
    	if got, want := r.Header.Get("Other"), "bar"; got != want {
    		t.Errorf("CONNECT request Other = %q; want %q", got, want)
    	}
    }
    
    func TestTransportProxyGetConnectHeader(t *testing.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)
  2. src/os/exec/exec_windows_test.go

    		t.Error(err)
    	}
    	w.Close()
    	response, err := io.ReadAll(r)
    	if err != nil {
    		t.Error(err)
    	}
    	r.Close()
    	if string(response) != marker {
    		t.Errorf("got %q; want %q", string(response), marker)
    	}
    	err = childProc.Wait()
    	if err != nil {
    		t.Error(err)
    	}
    }
    
    func TestNoInheritHandles(t *testing.T) {
    	t.Parallel()
    
    	cmd := testenv.Command(t, "cmd", "/c exit 88")
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Feb 21 23:07:55 UTC 2023
    - 2.4K bytes
    - Viewed (0)
  3. staging/src/k8s.io/apiserver/pkg/server/genericapiserver_graceful_termination_test.go

    	// /readyz must return an error, but we need to give it some time
    	err := wait.PollImmediate(100*time.Millisecond, wait.ForeverTestTimeout, func() (done bool, err error) {
    		resultGot := doer.Do(newClient(true), func(httptrace.GotConnInfo) {}, "/readyz", time.Second)
    		// wait until we have a non 200 response
    		if resultGot.response != nil && resultGot.response.StatusCode == http.StatusOK {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Apr 29 18:59:21 UTC 2024
    - 38.3K bytes
    - Viewed (0)
  4. test/typeparam/chans.go

    func TestReadAll() {
    	c := make(chan int)
    	go func() {
    		c <- 4
    		c <- 2
    		c <- 5
    		close(c)
    	}()
    	got := _ReadAll(context.Background(), c)
    	want := []int{4, 2, 5}
    	if !_SliceEqual(got, want) {
    		panic(fmt.Sprintf("_ReadAll returned %v, want %v", got, want))
    	}
    }
    
    func TestMerge() {
    	c1 := make(chan int)
    	c2 := make(chan int)
    	go func() {
    		c1 <- 1
    		c1 <- 3
    		c1 <- 5
    		close(c1)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Mar 01 19:45:34 UTC 2022
    - 8.4K bytes
    - Viewed (0)
  5. src/runtime/debug_test.go

    		for i := range in {
    			out[i] = in[i] + 1
    		}
    		return
    	}
    	var want [N]int
    	for i := range args.in {
    		args.in[i] = i
    		want[i] = i + 1
    	}
    	if _, err := runtime.InjectDebugCall(g, fn, nil, &args, debugCallTKill, false); err != nil {
    		t.Fatal(err)
    	}
    	if want != args.out {
    		t.Fatalf("want %v, got %v", want, args.out)
    	}
    }
    
    func TestDebugCallGC(t *testing.T) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Sep 08 15:08:04 UTC 2023
    - 8K bytes
    - Viewed (0)
  6. src/net/dial_unix_test.go

    	if err == nil {
    		c.Close()
    		t.Fatal("unexpected successful dial; want context canceled error")
    	}
    
    	select {
    	case <-ctx.Done():
    	case <-time.After(5 * time.Second):
    		t.Fatal("expected context to be canceled")
    	}
    
    	oe, ok := err.(*OpError)
    	if !ok || oe.Op != "dial" {
    		t.Fatalf("Dial error = %#v; want dial *OpError", err)
    	}
    
    	if oe.Err != errCanceled {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Mar 29 16:24:51 UTC 2022
    - 2.8K bytes
    - Viewed (0)
  7. src/database/sql/sql_test.go

    	if err != nil {
    		t.Fatal(err)
    	}
    
    	want, fail := 2, errors.New("fail")
    	r := rows.rowsi.(*rowsCursor)
    	r.errPos, r.err = want, fail
    
    	got := 0
    	for rows.Next() {
    		got++
    	}
    	if got != want {
    		t.Errorf("got %d rows, want %d", got, want)
    	}
    	if err := rows.Err(); err != fail {
    		t.Errorf("got error %v, want %v", err, fail)
    	}
    	if !r.closed {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 18:42:28 UTC 2024
    - 111.6K bytes
    - Viewed (0)
  8. src/runtime/gc_test.go

    		t.Fatalf("live object not in reachable set; want %b, got %b", want, got)
    	}
    	if bits.OnesCount64(got&^want) > 1 {
    		// Note: we can occasionally have a value that is retained even though
    		// it isn't live, due to conservative scanning of stack frames.
    		// See issue 67204. For now, we allow a "slop" of 1 unintentionally
    		// retained object.
    		t.Fatalf("dead object in reachable set; want %b, got %b", want, got)
    	}
    	runtime.KeepAlive(half)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jun 05 22:33:52 UTC 2024
    - 17.6K bytes
    - Viewed (0)
  9. src/internal/concurrent/hashtriemap_test.go

    		}
    		if ok && got != want {
    			t.Errorf("expected key %v to have value %v, got %v", key, want, got)
    		}
    	}
    }
    
    func expectMissing[K, V comparable](t *testing.T, key K, want V) func(got V, ok bool) {
    	t.Helper()
    	if want != *new(V) {
    		// This is awkward, but the want argument is necessary to smooth over type inference.
    		// Just make sure the want argument always looks the same.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 16:01:55 UTC 2024
    - 9.3K bytes
    - Viewed (0)
  10. staging/src/k8s.io/apiserver/pkg/storage/value/encrypt/envelope/metrics/metrics_test.go

    	testCases := []struct {
    		name         string
    		methodName   string
    		duration     time.Duration
    		operationErr error
    		want         string
    	}{
    		{
    			name:         "operation success",
    			methodName:   "/v2alpha1.KeyManagementService/Encrypt",
    			duration:     1 * time.Second,
    			operationErr: nil,
    			want: `
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat Sep 09 22:31:32 UTC 2023
    - 31.9K bytes
    - Viewed (0)
Back to top