From eea7f28be45251646bef4dc3bb1a26bf3ca04d8b Mon Sep 17 00:00:00 2001 From: Yicheng Qin Date: Wed, 24 Jun 2015 14:29:07 -0700 Subject: [PATCH] pkg/wait: extend timeout to check closed channel It is possible to trigger the time.After case if the timer went off between time.After setting the timer for its channel and the time that select looked at the channel. So it needs to be longer. refer: https://groups.google.com/forum/#!topic/golang-nuts/1tjcV80ccq8 --- pkg/wait/wait_time_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/wait/wait_time_test.go b/pkg/wait/wait_time_test.go index 279a4cc92..7f6972a5f 100644 --- a/pkg/wait/wait_time_test.go +++ b/pkg/wait/wait_time_test.go @@ -61,7 +61,7 @@ func TestWaitTestStress(t *testing.T) { for _, ch := range chs { select { case <-ch: - case <-time.After(10 * time.Millisecond): + case <-time.After(time.Second): t.Fatalf("cannot receive from ch as expected") } }