Search Options

Results per page
Sort
Preferred Languages
Advance

Results 51 - 60 of 162 for newResource (0.14 sec)

  1. staging/src/k8s.io/apiserver/plugin/pkg/authorizer/webhook/round_trip_test.go

    	authorizationv1beta1 "k8s.io/api/authorization/v1beta1"
    )
    
    func TestRoundTrip(t *testing.T) {
    	f := fuzz.New()
    	seed := time.Now().UnixNano()
    	t.Logf("seed = %v", seed)
    	f.RandSource(rand.New(rand.NewSource(seed)))
    
    	for i := 0; i < 1000; i++ {
    		original := &authorizationv1.SubjectAccessReview{}
    		f.Fuzz(&original.Spec)
    		f.Fuzz(&original.Status)
    		converted := &authorizationv1beta1.SubjectAccessReview{
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 12 15:48:03 UTC 2023
    - 3.5K bytes
    - Viewed (0)
  2. src/vendor/golang.org/x/net/nettest/conntest.go

    	})
    	defer timer.Stop()
    	f(t, c1, c2)
    }
    
    // testBasicIO tests that the data sent on c1 is properly received on c2.
    func testBasicIO(t *testing.T, c1, c2 net.Conn) {
    	want := make([]byte, 1<<20)
    	rand.New(rand.NewSource(0)).Read(want)
    
    	dataCh := make(chan []byte)
    	go func() {
    		rd := bytes.NewReader(want)
    		if err := chunkedCopy(c1, rd); err != nil {
    			t.Errorf("unexpected c1.Write error: %v", err)
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 04 16:19:04 UTC 2024
    - 12.2K bytes
    - Viewed (0)
  3. cmd/license-update.go

    )
    
    // initlicenseUpdateJob start the periodic license update job in the background.
    func initLicenseUpdateJob(ctx context.Context, objAPI ObjectLayer) {
    	go func() {
    		r := rand.New(rand.NewSource(time.Now().UnixNano()))
    		// Leader node (that successfully acquires the lock inside licenceUpdaterLoop)
    		// will keep performing the license update. If the leader goes down for some
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Thu Apr 04 12:04:40 UTC 2024
    - 3.3K bytes
    - Viewed (0)
  4. src/runtime/hash_test.go

    	"strings"
    	"testing"
    	"unsafe"
    )
    
    func TestMemHash32Equality(t *testing.T) {
    	if *UseAeshash {
    		t.Skip("skipping since AES hash implementation is used")
    	}
    	var b [4]byte
    	r := rand.New(rand.NewSource(1234))
    	seed := uintptr(r.Uint64())
    	for i := 0; i < 100; i++ {
    		randBytes(r, b[:])
    		got := MemHash32(unsafe.Pointer(&b), seed)
    		want := MemHash(unsafe.Pointer(&b), seed, 4)
    		if got != want {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 06 17:50:18 UTC 2024
    - 18.4K bytes
    - Viewed (0)
  5. pkg/api/testing/conversion_test.go

    	"k8s.io/kubernetes/pkg/api/legacyscheme"
    	api "k8s.io/kubernetes/pkg/apis/core"
    )
    
    func BenchmarkPodConversion(b *testing.B) {
    	apiObjectFuzzer := fuzzer.FuzzerFor(FuzzerFuncs, rand.NewSource(benchmarkSeed), legacyscheme.Codecs)
    	items := make([]api.Pod, 4)
    	for i := range items {
    		apiObjectFuzzer.Fuzz(&items[i])
    		items[i].Spec.InitContainers = nil
    		items[i].Status.InitContainerStatuses = nil
    	}
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat Oct 30 06:49:09 UTC 2021
    - 3.9K bytes
    - Viewed (0)
  6. pkg/test/loadbalancersim/loadbalancer/leastrequest.go

    }
    
    // nolint: gosec
    // Test only code
    func newUnweightedLeastRequest(conn *weightedConnections) network.Connection {
    	return &unweightedLeastRequest{
    		weightedConnections: conn,
    		r:                   rand.New(rand.NewSource(time.Now().UnixNano())),
    	}
    }
    
    func (lb *unweightedLeastRequest) pick2() (*WeightedConnection, *WeightedConnection) {
    	numConnections := len(lb.conns)
    	index1 := lb.r.Intn(numConnections)
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Mon Nov 14 20:23:34 UTC 2022
    - 3.4K bytes
    - Viewed (0)
  7. src/go/doc/comment/wrap_test.go

    func TestWrap(t *testing.T) {
    	if *wrapSeed == 0 {
    		*wrapSeed = time.Now().UnixNano()
    	}
    	t.Logf("-wrapseed=%#x\n", *wrapSeed)
    	r := rand.New(rand.NewSource(*wrapSeed))
    
    	// Generate words of random length.
    	s := "1234567890αβcdefghijklmnopqrstuvwxyz"
    	sN := utf8.RuneCountInString(s)
    	var words []string
    	for i := 0; i < 100; i++ {
    		n := 1 + r.Intn(sN-1)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Apr 11 16:31:45 UTC 2022
    - 3.7K bytes
    - Viewed (0)
  8. src/runtime/lfstack_test.go

    	for i := 0; i < K; i++ {
    		sum += i
    		node := allocMyNode(i)
    		LFStackPush(stacks[i%2], fromMyNode(node))
    	}
    	c := make(chan bool, P)
    	for p := 0; p < P; p++ {
    		go func() {
    			r := rand.New(rand.NewSource(rand.Int63()))
    			// Pop a node from a random stack, then push it onto a random stack.
    			for i := 0; i < N; i++ {
    				node := toMyNode(LFStackPop(stacks[r.Intn(2)]))
    				if node != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Nov 17 23:12:04 UTC 2022
    - 2.7K bytes
    - Viewed (0)
  9. internal/s3select/select_benchmark_test.go

    	"time"
    
    	humanize "github.com/dustin/go-humanize"
    )
    
    const charset = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"
    
    func newRandString(length int) string {
    	randSrc := rand.New(rand.NewSource(time.Now().UnixNano()))
    
    	b := make([]byte, length)
    	for i := range b {
    		b[i] = charset[randSrc.Intn(len(charset))]
    	}
    	return string(b)
    }
    
    func genSampleCSVData(count int) []byte {
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Thu Apr 14 13:54:47 UTC 2022
    - 5K bytes
    - Viewed (0)
  10. src/hash/maphash/smhasher_test.go

    var fixedSeed = MakeSeed()
    
    // Sanity checks.
    // hash should not depend on values outside key.
    // hash should not depend on alignment.
    func TestSmhasherSanity(t *testing.T) {
    	t.Parallel()
    	r := rand.New(rand.NewSource(1234))
    	const REP = 10
    	const KEYMAX = 128
    	const PAD = 16
    	const OFFMAX = 16
    	for k := 0; k < REP; k++ {
    		for n := 0; n < KEYMAX; n++ {
    			for i := 0; i < OFFMAX; i++ {
    				var b [KEYMAX + OFFMAX + 2*PAD]byte
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 03 16:41:38 UTC 2024
    - 11K bytes
    - Viewed (0)
Back to top