Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 830 for watt (0.39 sec)

  1. src/internal/trace/testdata/testprog/wait-on-pipe.go

    	time.Sleep(100 * time.Millisecond)
    
    	// Write to the pipe to unblock it.
    	if _, err := syscall.Write(wfd, []byte{10}); err != nil {
    		log.Fatalf("failed to write to pipe: %v", err)
    	}
    
    	// Wait for the goroutine to unblock and start running.
    	// This is helpful to catch incorrect information written
    	// down for the syscall-blocked goroutine, since it'll start
    	// executing, and that execution information will be
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 17 18:48:18 UTC 2024
    - 1.6K bytes
    - Viewed (0)
  2. staging/src/k8s.io/apiserver/pkg/storage/cacher/watch_progress_test.go

    	}); err != nil {
    		t.Fatalf("Failed to wait progress requests, err: %s, want: %d , got %d", err, wantRequestsSent, requestsSent)
    	}
    	pr.Add()
    	clock.Step(progressRequestPeriod * 2)
    	if err := pollConditionNoChange(pollPeriod, minimalNoChange, pollTimeout, func() bool {
    		requestsSent = pr.progressRequestsSentCount.Load()
    		return requestsSent == wantRequestsSent
    	}); err != nil {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Mar 04 11:51:06 UTC 2024
    - 4.6K bytes
    - Viewed (0)
  3. src/os/pidfd_linux_test.go

    	}
    
    	// Check that all Process' public methods work as expected with
    	// "done" Process.
    	if err := proc.Kill(); err != os.ErrProcessDone {
    		t.Errorf("Kill: got %v, want %v", err, os.ErrProcessDone)
    	}
    	if err := proc.Signal(os.Kill); err != os.ErrProcessDone {
    		t.Errorf("Signal: got %v, want %v", err, os.ErrProcessDone)
    	}
    	if _, err := proc.Wait(); !errors.Is(err, syscall.ECHILD) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 11 18:08:44 UTC 2024
    - 1.6K bytes
    - Viewed (0)
  4. src/os/exec_unix_test.go

    		// Solaris/Illumos have a lower limit, above which wait returns
    		// EINVAL (see waitid in usr/src/uts/common/os/exit.c in
    		// illumos). This is configurable via sysconf(_SC_MAXPID), but
    		// we'll just take the default.
    		pid = 30000-1
    	}
    
    	p, err := FindProcess(pid)
    	if err != nil {
    		t.Fatalf("FindProcess(math.MaxInt32) got err %v, want nil", err)
    	}
    
    	if ps, err := p.Wait(); !errors.Is(err, syscall.ECHILD) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 11 18:08:44 UTC 2024
    - 2K bytes
    - Viewed (0)
  5. cni/pkg/log/uds_test.go

    		delete(parsedLog, "time")
    		want := map[string]any{
    			"level": cases[i].level,
    			"msg":   cases[i].msg,
    		}
    		if k := cases[i].key; k != nil {
    			want["key"] = *k
    		}
    		assert.Equal(t, want, parsedLog)
    		i++
    	}
    }
    
    func TestParseCniLog(t *testing.T) {
    	wantT := &time.Time{}
    	assert.NoError(t, wantT.UnmarshalText([]byte("2020-01-01T00:00:00.356374Z")))
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed Jun 12 16:26:28 UTC 2024
    - 4.1K bytes
    - Viewed (0)
  6. src/sync/example_test.go

    			sum += i
    		}
    		fmt.Println("Computed once:", sum)
    		return sum
    	})
    	done := make(chan bool)
    	for i := 0; i < 10; i++ {
    		go func() {
    			const want = 499500
    			got := once()
    			if got != want {
    				fmt.Println("want", want, "got", got)
    			}
    			done <- true
    		}()
    	}
    	for i := 0; i < 10; i++ {
    		<-done
    	}
    	// Output:
    	// Computed once: 499500
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 23 17:45:47 UTC 2024
    - 2.2K bytes
    - Viewed (0)
  7. pilot/pkg/serviceregistry/util/xdsfake/updater.go

    		if len(events) == 0 {
    			return
    		}
    		select {
    		case e := <-fx.Events:
    			found := false
    			for i, want := range events {
    				if e.Type == want.Type &&
    					(want.ID == "" || e.ID == want.ID) &&
    					(want.Namespace == "" || want.Namespace == e.Namespace) &&
    					(want.EndpointCount == 0 || want.EndpointCount == len(e.Endpoints)) {
    					// Matched - delete event from desired
    					events = slices.Delete(events, i)
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Feb 29 18:40:34 UTC 2024
    - 6.2K bytes
    - Viewed (0)
  8. 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)
  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. src/cmd/go/testdata/script/goroot_executable_trimpath.txt

    )
    
    func main() {
    	exe := os.Args[1]
    	want := os.Args[2]
    	cmd := exec.Command(exe, "env", "GOROOT")
    	out, err := cmd.CombinedOutput()
    	if err != nil {
    		fmt.Fprintf(os.Stderr, "%s env GOROOT: %v, %s\n", exe, err, out)
    		os.Exit(1)
    	}
    	goroot, err := filepath.EvalSymlinks(strings.TrimSpace(string(out)))
    	if err != nil {
    		fmt.Fprintln(os.Stderr, err)
    		os.Exit(1)
    	}
    	want, err = filepath.EvalSymlinks(want)
    	if err != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Feb 21 22:16:54 UTC 2024
    - 3K bytes
    - Viewed (0)
Back to top