Merge pull request #62445 from yue9944882/fix-job-backoff-test

Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Fixes failing job back off test

**What this PR does / why we need it**:

 The test `TestJobBackoff` is always failing on my local environment.

After debugging, I find that it is caused by `fakeRateLimitQueue` in which the `Forget` call should have delete the key entry from the queue. But actually it is doing nothing. 

IDK why upstream test is running successfully all the time. Am I missing sth?


**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
Fixes #

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
pull/8/head
Kubernetes Submit Queue 2018-04-18 11:57:10 -07:00 committed by GitHub
commit 9d0e3dff07
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -1350,7 +1350,9 @@ type fakeRateLimitingQueue struct {
}
func (f *fakeRateLimitingQueue) AddRateLimited(item interface{}) {}
func (f *fakeRateLimitingQueue) Forget(item interface{}) {}
func (f *fakeRateLimitingQueue) Forget(item interface{}) {
f.requeues = 0
}
func (f *fakeRateLimitingQueue) NumRequeues(item interface{}) int {
return f.requeues
}