From 956d6c508bde11ddf1263f84a8367f31d569b09f Mon Sep 17 00:00:00 2001 From: Vladimir Mihailenco Date: Tue, 15 Mar 2016 14:45:04 +0200 Subject: [PATCH] Try to fix flaky test. --- example_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/example_test.go b/example_test.go index 1baaa111..e5cb5b28 100644 --- a/example_test.go +++ b/example_test.go @@ -254,9 +254,9 @@ func ExamplePubSub_Receive() { } fmt.Println(n, "clients received message") - for { + for i := 0; i < 2; i++ { // ReceiveTimeout is a low level API. Use ReceiveMessage instead. - msgi, err := pubsub.ReceiveTimeout(time.Second) + msgi, err := pubsub.ReceiveTimeout(5 * time.Second) if err != nil { break }