- Sort Score
- Result 10 results
- Languages All
Results 41 - 50 of 57 for newResource (0.23 sec)
-
staging/src/k8s.io/api/roundtrip_test.go
// I'm only using the generic fuzzer funcs, but at some point in time we might need to // switch to specialized. For now we're happy with the current serialization test. fuzzer := fuzzer.FuzzerFor(genericfuzzer.Funcs, rand.NewSource(seed), codecs) roundtrip.RoundTripExternalTypes(t, scheme, codecs, fuzzer, nil) } func TestCompatibility(t *testing.T) { scheme := runtime.NewScheme() for _, builder := range groups {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri Mar 08 04:18:56 UTC 2024 - 5.9K bytes - Viewed (0) -
cmd/dynamic-timeouts_test.go
// Race test. timeout := newDynamicTimeout(time.Second, time.Millisecond) var wg sync.WaitGroup for i := 0; i < runtime.GOMAXPROCS(0); i++ { wg.Add(1) rng := rand.New(rand.NewSource(int64(i))) go func() { defer wg.Done() for i := 0; i < 100; i++ { for j := 0; j < 100; j++ { timeout.LogSuccess(time.Duration(float64(time.Second) * rng.Float64())) }
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Fri Oct 14 10:08:40 UTC 2022 - 5.4K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/util/flowcontrol/conc_alloc_test.go
) // floating-point imprecision const fpSlack = 1e-10 // TestConcAlloc tests computeConcurrencyAllocation with a bunch of randomly generated cases. func TestConcAlloc(t *testing.T) { rands := rand.New(rand.NewSource(1234567890)) for i := 0; i < 10000; i++ { test1ConcAlloc(t, rands) } } func test1ConcAlloc(t *testing.T, rands *rand.Rand) { probLen := ([]int{0, 1, 2, 3, 4, 6, 9})[rands.Intn(7)]
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Mon Nov 07 18:17:27 UTC 2022 - 5.3K bytes - Viewed (0) -
cmd/callhome.go
// initCallhome will start the callhome task in the background. func initCallhome(ctx context.Context, objAPI ObjectLayer) { if !globalCallhomeConfig.Enabled() { return } go func() { r := rand.New(rand.NewSource(time.Now().UnixNano())) // Leader node (that successfully acquires the lock inside runCallhome) // will keep performing the callhome. If the leader goes down for some reason,
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Fri May 17 16:53:34 UTC 2024 - 5.3K bytes - Viewed (0) -
src/sync/atomic/value_test.go
N := int(1e5) if testing.Short() { p /= 2 N = 1e3 } for _, test := range tests { var v Value done := make(chan bool, p) for i := 0; i < p; i++ { go func() { r := rand.New(rand.NewSource(rand.Int63())) expected := true loop: for j := 0; j < N; j++ { x := test[r.Intn(len(test))] v.Store(x) x = v.Load() for _, x1 := range test { if x == x1 {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Dec 13 18:45:54 UTC 2021 - 6.1K bytes - Viewed (0) -
pkg/api/testing/applyconfiguration_test.go
internalObj, err := legacyscheme.Scheme.New(internalVersion.WithKind(kind)) if err != nil { t.Fatalf("Couldn't create internal object %v: %v", kind, err) } seed := rand.Int63() fuzzer.FuzzerFor(FuzzerFuncs, rand.NewSource(seed), legacyscheme.Codecs). Funcs( // Ensure that InitContainers and their statuses are not generated. This // is because in this test we are simply doing json operations, in which // those disappear.
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu May 05 20:12:50 UTC 2022 - 7.3K bytes - Viewed (0) -
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) -
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) -
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) -
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)