From 6a62f7f48369f28d257b0237b276b9928cffbda0 Mon Sep 17 00:00:00 2001 From: Monis Khan Date: Thu, 31 Aug 2017 09:49:57 -0400 Subject: [PATCH] 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 --- pkg/controller/node/scheduler/timed_workers_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/controller/node/scheduler/timed_workers_test.go b/pkg/controller/node/scheduler/timed_workers_test.go index 6003b07a697..e07c6daee1a 100644 --- a/pkg/controller/node/scheduler/timed_workers_test.go +++ b/pkg/controller/node/scheduler/timed_workers_test.go @@ -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)