Search Options

Results per page
Sort
Preferred Languages
Advance

Results 81 - 90 of 162 for newResource (0.18 sec)

  1. pkg/controller/certificates/approver/sarapprove_test.go

    				t.Errorf("expected recognized to be %v", shouldRecognize)
    			}
    		})
    	}
    }
    
    // noncryptographic for faster testing
    // DO NOT COPY THIS CODE
    var insecureRand = rand.New(rand.NewSource(0))
    
    func makeTestCsr() *capi.CertificateSigningRequest {
    	return makeFancyTestCsr(csrBuilder{cn: "test-cert"})
    }
    
    type csrBuilder struct {
    	cn         string
    	orgs       []string
    	requestor  string
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Aug 02 21:12:04 UTC 2022
    - 7.7K bytes
    - Viewed (0)
  2. cmd/erasure-metadata-utils_test.go

    	testShuffleDisks(t, z)
    }
    
    func Test_hashOrder(t *testing.T) {
    	for x := 1; x < 17; x++ {
    		t.Run(fmt.Sprintf("%d", x), func(t *testing.T) {
    			var first [17]int
    			rng := rand.New(rand.NewSource(0))
    			var tmp [16]byte
    			rng.Read(tmp[:])
    			prefix := hex.EncodeToString(tmp[:])
    			for i := 0; i < 10000; i++ {
    				rng.Read(tmp[:])
    
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Thu Jan 18 07:03:17 UTC 2024
    - 7.4K bytes
    - Viewed (0)
  3. staging/src/k8s.io/apiserver/pkg/authentication/token/cache/cached_token_authenticator_test.go

    }
    
    func (s *singleBenchmark) makeTokens() {
    	s.tokenToResponse = map[string]*cacheRecord{}
    	s.tokenToAuds = map[string]authenticator.Audiences{}
    	s.tokens = []string{}
    
    	rr := mathrand.New(mathrand.NewSource(mathrand.Int63()))
    
    	for i := 0; i < s.tokenCount; i++ {
    		tok := fmt.Sprintf("%v-%v", jwtToken, i)
    		r := cacheRecord{
    			resp: &authenticator.Response{
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Jul 03 16:16:51 UTC 2023
    - 20.3K bytes
    - Viewed (0)
  4. pkg/registry/core/service/allocator/bitmap.go

    func NewAllocationMapWithOffset(max int, rangeSpec string, offset int) *AllocationBitmap {
    	a := AllocationBitmap{
    		strategy: randomScanStrategyWithOffset{
    			rand:   rand.New(rand.NewSource(time.Now().UnixNano())),
    			offset: offset,
    		},
    		allocated: big.NewInt(0),
    		count:     0,
    		max:       max,
    		rangeSpec: rangeSpec,
    	}
    
    	return &a
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jan 25 20:32:40 UTC 2023
    - 7.6K bytes
    - Viewed (0)
  5. staging/src/k8s.io/apiserver/pkg/util/flowcontrol/fairqueuing/testing/eventclock/fake.go

    func NewFake(t time.Time, fuzz time.Duration, r *rand.Rand) (*Fake, counter.GoRoutineCounter) {
    	grc := &waitGroupCounter{}
    
    	if r == nil {
    		r = rand.New(rand.NewSource(time.Now().UnixNano()))
    		r.Uint64()
    		r.Uint64()
    		r.Uint64()
    	}
    	return &Fake{
    		FakePassiveClock: *baseclocktest.NewFakePassiveClock(t),
    		clientWG:         grc,
    		fuzz:             fuzz,
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sun Dec 18 04:27:38 UTC 2022
    - 7.9K bytes
    - Viewed (0)
  6. staging/src/k8s.io/apimachinery/pkg/api/apitesting/roundtrip/roundtrip.go

    	codecFactory := runtimeserializer.NewCodecFactory(scheme)
    	f := fuzzer.FuzzerFor(
    		fuzzer.MergeFuzzerFuncs(metafuzzer.Funcs, fuzzingFuncs),
    		rand.NewSource(rand.Int63()),
    		codecFactory,
    	)
    	RoundTripTypesWithoutProtobuf(t, scheme, codecFactory, f, nil)
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 12 15:48:03 UTC 2023
    - 16.8K bytes
    - Viewed (0)
  7. staging/src/k8s.io/apiserver/pkg/util/flowcontrol/controller_test.go

    		mandQueueSetNames.Insert(mpl.Name)
    	}
    	return mandQueueSetNames
    }()
    
    func TestConfigConsumer(t *testing.T) {
    	rngOuter := rand.New(rand.NewSource(1234567890123456789))
    	for i := 1; i <= 10; i++ {
    		rng := rand.New(rand.NewSource(int64(rngOuter.Uint64())))
    		t.Run(fmt.Sprintf("trial%d:", i), func(t *testing.T) {
    			clientset := clientsetfake.NewSimpleClientset()
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Oct 30 12:18:40 UTC 2023
    - 18.4K bytes
    - Viewed (0)
  8. pkg/api/testing/serialization_proto_test.go

    			}
    		}
    	}
    	return nil
    }
    
    func TestProtobufRoundTrip(t *testing.T) {
    	obj := &v1.Pod{}
    	fuzzer.FuzzerFor(FuzzerFuncs, rand.NewSource(benchmarkSeed), legacyscheme.Codecs).Fuzz(obj)
    	// InitContainers are turned into annotations by conversion.
    	obj.Spec.InitContainers = nil
    	obj.Status.InitContainerStatuses = nil
    	data, err := obj.Marshal()
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat Jun 25 16:23:43 UTC 2022
    - 7.1K bytes
    - Viewed (0)
  9. okhttp/src/main/kotlin/okhttp3/internal/cache/DiskLruCache.kt

            }
          }
        }
    
        /**
         * Returns an unbuffered input stream to read the last committed value, or null if no value has
         * been committed.
         */
        fun newSource(index: Int): Source? {
          synchronized(this@DiskLruCache) {
            check(!done)
            if (!entry.readable || entry.currentEditor != this || entry.zombie) {
              return null
            }
            return try {
    Registered: Sun Jun 16 04:42:17 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 34.7K bytes
    - Viewed (0)
  10. src/image/gif/writer_test.go

    	}
    }
    
    func BenchmarkEncodeRandomPaletted(b *testing.B) {
    	paletted := image.NewPaletted(image.Rect(0, 0, 640, 480), palette.Plan9)
    	rnd := rand.New(rand.NewSource(123))
    	for i := range paletted.Pix {
    		paletted.Pix[i] = uint8(rnd.Intn(256))
    	}
    
    	b.SetBytes(640 * 480 * 1)
    	b.ReportAllocs()
    	b.ResetTimer()
    	for i := 0; i < b.N; i++ {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jun 03 14:56:25 UTC 2024
    - 19K bytes
    - Viewed (0)
Back to top