- Sort Score
- Result 10 results
- Languages All
Results 1 - 5 of 5 for NewFakeClock (0.13 sec)
-
pkg/kubelet/util/manager/cache_based_manager_test.go
t.Errorf("Unexpected secret: %v", secret) } } func TestSecretStoreGetAlwaysRefresh(t *testing.T) { fakeClient := &fake.Clientset{} fakeClock := testingclock.NewFakeClock(time.Now()) store := newSecretStore(fakeClient, fakeClock, noObjectTTL, 0) for i := 0; i < 10; i++ { store.AddReference(fmt.Sprintf("ns-%d", i), fmt.Sprintf("name-%d", i), types.UID(fmt.Sprintf("pod-%d", i))) }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Jun 04 06:25:43 UTC 2024 - 19.6K bytes - Viewed (0) -
pkg/controller/job/backoff_utils_test.go
maxBackoff: 700 * time.Second, wantDuration: 700 * time.Second, }, } for name, tc := range testCases { t.Run(name, func(t *testing.T) { fakeClock := clocktesting.NewFakeClock(tc.currentTime.Truncate(time.Second)) d := tc.backoffRecord.getRemainingTime(fakeClock, tc.defaultBackoff, tc.maxBackoff) if d.Seconds() != tc.wantDuration.Seconds() {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu Jun 06 07:46:41 UTC 2024 - 16.7K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/storage/cacher/cache_watcher_test.go
w := newCacheWatcher(0, filter, forget, storage.APIObjectVersioner{}, deadline, true, schema.GroupResource{Resource: "pods"}, "") w.setBookmarkAfterResourceVersion(0) return w } clock := testingclock.NewFakeClock(time.Now()) watchers := newTimeBucketWatchers(clock, defaultBookmarkFrequency) now := clock.Now() watchers.addWatcherThreadUnsafe(newWatcher(now.Add(10 * time.Second)))
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Jun 04 09:20:10 UTC 2024 - 22.9K bytes - Viewed (0) -
pkg/controller/podgc/gc_controller_test.go
nodeInformer.Informer().GetStore().Add(node) } for _, pod := range test.pods { podInformer.Informer().GetStore().Add(pod) } // Overwrite queue fakeClock := testingclock.NewFakeClock(time.Now()) gcc.nodeQueue.ShutDown() gcc.nodeQueue = workqueue.NewTypedDelayingQueueWithConfig(workqueue.TypedDelayingQueueConfig[string]{Clock: fakeClock, Name: "podgc_test_queue"}) // First GC of orphaned pods
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Jun 12 08:16:48 UTC 2024 - 29K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/storage/cacher/watch_cache_test.go
pr := newConditionalProgressRequester(wc.RequestWatchProgress, &immediateTickerFactory{}, nil) go pr.Run(wc.stopCh) wc.watchCache = newWatchCache(keyFunc, mockHandler, getAttrsFunc, versioner, indexers, testingclock.NewFakeClock(time.Now()), schema.GroupResource{Resource: "pods"}, pr) // To preserve behavior of tests that assume a given capacity, // resize it to th expected size. wc.capacity = capacity
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Jun 04 09:20:10 UTC 2024 - 35.4K bytes - Viewed (0)