Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 24 of 24 for AddAfter (0.09 sec)

  1. pkg/controller/cronjob/cronjob_controllerv2_test.go

    			}
    		})
    	}
    
    }
    
    type fakeQueue struct {
    	workqueue.TypedRateLimitingInterface[string]
    	delay time.Duration
    	key   interface{}
    }
    
    func (f *fakeQueue) AddAfter(key string, delay time.Duration) {
    	f.delay = delay
    	f.key = key
    }
    
    // this test will take around 61 seconds to complete
    func TestControllerV2UpdateCronJob(t *testing.T) {
    	tests := []struct {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat May 04 18:33:12 UTC 2024
    - 70.8K bytes
    - Viewed (0)
  2. pkg/controller/garbagecollector/garbagecollector_test.go

    					}
    				}
    			}
    		},
    	}
    
    }
    
    // trackingWorkqueue implements RateLimitingInterface,
    // allows introspection of the items in the queue,
    // and treats AddAfter and AddRateLimited the same as Add
    // so they are always synchronous.
    type trackingWorkqueue[T comparable] struct {
    	limiter     workqueue.TypedRateLimitingInterface[T]
    	pendingList []T
    	pendingMap  map[T]struct{}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat May 04 18:33:12 UTC 2024
    - 111.6K bytes
    - Viewed (0)
  3. staging/src/k8s.io/apiserver/pkg/util/flowcontrol/apf_controller.go

    		specificDelay, err := cfgCtlr.syncOne()
    		switch {
    		case err != nil:
    			klog.Error(err)
    			cfgCtlr.configQueue.AddRateLimited(obj)
    		case specificDelay > 0:
    			cfgCtlr.configQueue.AddAfter(obj, specificDelay)
    		default:
    			cfgCtlr.configQueue.Forget(obj)
    		}
    	}(obj)
    
    	return true
    }
    
    // syncOne does one full synchronization.  It reads all the API
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat May 04 18:33:12 UTC 2024
    - 48.8K bytes
    - Viewed (0)
  4. pkg/controller/job/job_controller_test.go

    func (f *fakeRateLimitingQueue) Forget(item string) {
    	f.requeues = 0
    }
    func (f *fakeRateLimitingQueue) NumRequeues(item string) int {
    	return f.requeues
    }
    func (f *fakeRateLimitingQueue) AddAfter(item string, duration time.Duration) {
    	f.item = item
    	f.duration = duration
    }
    
    func TestJobBackoff(t *testing.T) {
    	_, ctx := ktesting.NewTestContext(t)
    	logger := klog.FromContext(ctx)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jun 11 15:36:36 UTC 2024
    - 229.2K bytes
    - Viewed (0)
Back to top