Merge pull request #51705 from enj/enj/i/panic_timed_workers_test/51704

Automatic merge from submit-queue (batch tested with PRs 51031, 51705, 51888, 51727, 51684). 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>..

Address panic in TestCancelAndReadd

This further increases the timeouts in `timed_workers_test` to reduce the chance of a race condition against the wait group.

Signed-off-by: Monis Khan <mkhan@redhat.com>

Fixes #51704

/assign @gmarek

cc @davidopp @timothysc

```release-note
NONE
```
This commit is contained in:
Kubernetes Submit Queue 2017-09-23 01:47:02 -07:00 committed by GitHub
commit 815b894dd4

View File

@ -61,7 +61,7 @@ func TestExecuteDelayed(t *testing.T) {
return nil
})
now := time.Now()
then := now.Add(time.Second)
then := now.Add(3 * time.Second)
queue.AddWork(NewWorkArgs("1", "1"), now, then)
queue.AddWork(NewWorkArgs("2", "2"), now, then)
queue.AddWork(NewWorkArgs("3", "3"), now, then)
@ -89,7 +89,7 @@ func TestCancel(t *testing.T) {
return nil
})
now := time.Now()
then := now.Add(time.Second)
then := now.Add(3 * time.Second)
queue.AddWork(NewWorkArgs("1", "1"), now, then)
queue.AddWork(NewWorkArgs("2", "2"), now, then)
queue.AddWork(NewWorkArgs("3", "3"), now, then)
@ -119,7 +119,7 @@ func TestCancelAndReadd(t *testing.T) {
return nil
})
now := time.Now()
then := now.Add(time.Second)
then := now.Add(3 * time.Second)
queue.AddWork(NewWorkArgs("1", "1"), now, then)
queue.AddWork(NewWorkArgs("2", "2"), now, then)
queue.AddWork(NewWorkArgs("3", "3"), now, then)