From 1c5fbd568c03806a56f69c15c8b176e56eb24f37 Mon Sep 17 00:00:00 2001 From: Brian Brazil Date: Wed, 23 Sep 2015 08:53:55 +0100 Subject: [PATCH] retrieval: Reduce flakiness of TestTargetManagerChan This will increase test time by a few hundred ms, this is the 2nd most common cause of flakiness. --- retrieval/targetmanager_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/retrieval/targetmanager_test.go b/retrieval/targetmanager_test.go index f6b9344ea..f098fafd4 100644 --- a/retrieval/targetmanager_test.go +++ b/retrieval/targetmanager_test.go @@ -174,7 +174,7 @@ func TestTargetManagerChan(t *testing.T) { for i, step := range sequence { prov1.update <- step.tgroup - <-time.After(1 * time.Millisecond) + time.Sleep(20 * time.Millisecond) if len(targetManager.targets) != len(step.expected) { t.Fatalf("step %d: sources mismatch %v, %v", i, targetManager.targets, step.expected)