Try to fix flaky test.

This commit is contained in:
Vladimir Mihailenco 2016-03-15 14:45:04 +02:00
parent 707472c09b
commit 956d6c508b
1 changed files with 2 additions and 2 deletions

View File

@ -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
}