Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 2,831 for watt (0.04 sec)

  1. staging/src/k8s.io/apimachinery/pkg/util/waitgroup/ratelimited_waitgroup_test.go

    import (
    	"context"
    	"strings"
    	"sync"
    	"testing"
    	"time"
    
    	"golang.org/x/time/rate"
    	"k8s.io/apimachinery/pkg/util/wait"
    )
    
    func TestRateLimitedSafeWaitGroup(t *testing.T) {
    	// we want to keep track of how many times rate limiter Wait method is
    	// being invoked, both before and after the wait group is in waiting mode.
    	limiter := &limiterWrapper{}
    
    	// we expect the context passed by the factory to be used
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Feb 21 14:08:00 UTC 2023
    - 8.6K bytes
    - Viewed (0)
  2. src/os/exec/exec_posix_test.go

    			if err != nil {
    				t.Fatalf("%v:\n%s", err, cmd.Stderr)
    			}
    			got := strings.Trim(string(out), "\r\n")
    			t.Logf("in\n\t%s\n`pwd` reported\n\t%s", tc.dir, got)
    			if got != tc.want {
    				t.Errorf("want\n\t%s", tc.want)
    			}
    		})
    	}
    }
    
    // However, if cmd.Env is set explicitly, setting Dir should not override it.
    // (This checks that the implementation for https://go.dev/issue/50599 doesn't
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 13 20:21:32 UTC 2022
    - 6.8K bytes
    - Viewed (0)
  3. src/cmd/go/testdata/script/goroot_executable.txt

    	if err != nil {
    		fmt.Fprintln(os.Stderr, err)
    		os.Exit(1)
    	}
    	want, err := filepath.EvalSymlinks(os.Args[1])
    	if err != nil {
    		fmt.Fprintln(os.Stderr, err)
    		os.Exit(1)
    	}
    	if !strings.EqualFold(goroot, want) {
    		fmt.Fprintf(os.Stderr, "go env GOROOT:\nhave %s\nwant %s\n", goroot, want)
    		os.Exit(1)
    	}
    	fmt.Fprintf(os.Stderr, "go env GOROOT: %s\n", goroot)
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Feb 21 22:16:54 UTC 2024
    - 2.6K bytes
    - Viewed (0)
  4. samples/tcp-echo/src/main_test.go

    func TestTcpEchoServer(t *testing.T) {
    	// set up test parameters
    	prefix := "hello"
    	request := "world"
    	want := prefix + " " + request
    
    	// start the TCP Echo Server
    	os.Args = []string{"main", "9000,9001", prefix}
    	go main()
    
    	// wait for the TCP Echo Server to start
    	time.Sleep(500 * time.Millisecond)
    
    	for _, addr := range []string{":9000", ":9001"} {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Mon Mar 06 09:12:44 UTC 2023
    - 1.7K bytes
    - Viewed (0)
  5. pkg/controller/job/tracking_utils_test.go

    			}
    		})
    	}
    }
    
    func validateTerminatedPodsTrackingFinalizerTotal(event string, want int) error {
    	got, err := testutil.GetCounterMetricValue(metrics.TerminatedPodsTrackingFinalizerTotal.WithLabelValues(event))
    	if err != nil {
    		return err
    	}
    	if int(got) != want {
    		return fmt.Errorf("got value %d, want %d", int(got), want)
    	}
    	return nil
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jun 14 05:40:02 UTC 2023
    - 5.9K bytes
    - Viewed (0)
  6. src/runtime/testdata/testprogcgo/bindm.go

    const cThreadNum = 2
    
    func init() {
    	register("EnsureBindM", EnsureBindM)
    }
    
    //export GoCheckBindM
    func GoCheckBindM(thread uintptr) {
    	// Wait all threads start
    	if started.Load() != cThreadNum {
    		// Only once for each thread, since it will wait all threads start.
    		started.Add(1)
    		for started.Load() < cThreadNum {
    			runtime.Gosched()
    		}
    	}
    	m := runtime_getm_for_test()
    	mutex.Lock()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 17 21:53:11 UTC 2023
    - 1.2K bytes
    - Viewed (0)
  7. src/net/http/pprof/pprof_test.go

    			}
    			if got, want := resp.Header.Get("Content-Type"), tc.contentType; got != want {
    				t.Errorf("Content-Type: got %q; want %q", got, want)
    			}
    			if got, want := resp.Header.Get("Content-Disposition"), tc.contentDisposition; got != want {
    				t.Errorf("Content-Disposition: got %q; want %q", got, want)
    			}
    
    			if resp.StatusCode == http.StatusOK {
    				return
    			}
    			if got, want := resp.Header.Get("X-Go-Pprof"), "1"; got != want {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Dec 07 19:52:28 UTC 2023
    - 9.7K bytes
    - Viewed (0)
  8. src/syscall/exec_windows_test.go

    	}
    	childOutput, err = os.ReadFile(childDumpPath)
    	if err != nil {
    		t.Fatalf("reading child output failed: %v", err)
    	}
    	if got, want := string(childOutput), fmt.Sprintf("%d", parent.Process.Pid); got != want {
    		t.Fatalf("child output: want %q, got %q", want, got)
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Sep 05 23:35:29 UTC 2023
    - 3.1K bytes
    - Viewed (0)
  9. src/runtime/debuglog_test.go

    	if want := "[] true false -42 32767 18446744073709551615 0xfff 0x0 aaaa const string\n"; got != want {
    		t.Fatalf("want %q, got %q", want, got)
    	}
    }
    
    func TestDebugLogSym(t *testing.T) {
    	skipDebugLog(t)
    	runtime.ResetDebugLog()
    	pc, _, _, _ := runtime.Caller(0)
    	runtime.Dlog().PC(pc).End()
    	got := dlogCanonicalize(runtime.DumpDebugLog())
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Oct 18 16:59:26 UTC 2022
    - 4.9K bytes
    - Viewed (0)
  10. staging/src/k8s.io/apiserver/pkg/registry/generic/registry/decorated_watcher_test.go

    		}
    		if pod.Annotations["decorated"] != "true" {
    			t.Fatalf("pod.Annotations[\"decorated\"], want=%s, get=%s", "true", pod.Labels["decorated"])
    		}
    		if e.Type != watchType {
    			t.Fatalf("expected type %s, got %s", watchType, e.Type)
    		}
    	case <-time.After(wait.ForeverTestTimeout):
    		t.Fatalf("timeout after %v", wait.ForeverTestTimeout)
    	}
    }
    
    func expectErrorEvent(t *testing.T, dw *decoratedWatcher) {
    	select {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jun 02 19:25:31 UTC 2021
    - 3.4K bytes
    - Viewed (0)
Back to top