mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-03 17:30:00 +00:00
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>
This commit is contained in:
parent
721923924d
commit
6a62f7f483
@ -61,7 +61,7 @@ func TestExecuteDelayed(t *testing.T) {
|
|||||||
return nil
|
return nil
|
||||||
})
|
})
|
||||||
now := time.Now()
|
now := time.Now()
|
||||||
then := now.Add(time.Second)
|
then := now.Add(3 * time.Second)
|
||||||
queue.AddWork(NewWorkArgs("1", "1"), now, then)
|
queue.AddWork(NewWorkArgs("1", "1"), now, then)
|
||||||
queue.AddWork(NewWorkArgs("2", "2"), now, then)
|
queue.AddWork(NewWorkArgs("2", "2"), now, then)
|
||||||
queue.AddWork(NewWorkArgs("3", "3"), now, then)
|
queue.AddWork(NewWorkArgs("3", "3"), now, then)
|
||||||
@ -89,7 +89,7 @@ func TestCancel(t *testing.T) {
|
|||||||
return nil
|
return nil
|
||||||
})
|
})
|
||||||
now := time.Now()
|
now := time.Now()
|
||||||
then := now.Add(time.Second)
|
then := now.Add(3 * time.Second)
|
||||||
queue.AddWork(NewWorkArgs("1", "1"), now, then)
|
queue.AddWork(NewWorkArgs("1", "1"), now, then)
|
||||||
queue.AddWork(NewWorkArgs("2", "2"), now, then)
|
queue.AddWork(NewWorkArgs("2", "2"), now, then)
|
||||||
queue.AddWork(NewWorkArgs("3", "3"), now, then)
|
queue.AddWork(NewWorkArgs("3", "3"), now, then)
|
||||||
@ -119,7 +119,7 @@ func TestCancelAndReadd(t *testing.T) {
|
|||||||
return nil
|
return nil
|
||||||
})
|
})
|
||||||
now := time.Now()
|
now := time.Now()
|
||||||
then := now.Add(time.Second)
|
then := now.Add(3 * time.Second)
|
||||||
queue.AddWork(NewWorkArgs("1", "1"), now, then)
|
queue.AddWork(NewWorkArgs("1", "1"), now, then)
|
||||||
queue.AddWork(NewWorkArgs("2", "2"), now, then)
|
queue.AddWork(NewWorkArgs("2", "2"), now, then)
|
||||||
queue.AddWork(NewWorkArgs("3", "3"), now, then)
|
queue.AddWork(NewWorkArgs("3", "3"), now, then)
|
||||||
|
Loading…
Reference in New Issue
Block a user