From 6d33d28de81639448f8cea39ffdbf3afd40039c0 Mon Sep 17 00:00:00 2001 From: Wojciech Tyczynski Date: Wed, 30 Dec 2015 14:03:38 +0100 Subject: [PATCH] Fix wait_test flakes --- pkg/util/wait/wait_test.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/pkg/util/wait/wait_test.go b/pkg/util/wait/wait_test.go index e130cfcc14f..e027a448103 100644 --- a/pkg/util/wait/wait_test.go +++ b/pkg/util/wait/wait_test.go @@ -185,13 +185,12 @@ func TestPollForever(t *testing.T) { } } - // at most two poll notifications should be sent once we return from the condition + // at most one poll notification should be sent once we return from the condition done <- struct{}{} go func() { for i := 0; i < 2; i++ { _, open := <-ch - if open { - <-complete + if !open { return } }