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:
Monis Khan 2017-08-31 09:49:57 -04:00
parent 721923924d
commit 6a62f7f483
No known key found for this signature in database
GPG Key ID: 52C90ADA01B269B8

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)