mirror of https://github.com/go-redis/redis.git
Try to fix flaky test.
This commit is contained in:
parent
707472c09b
commit
956d6c508b
|
@ -254,9 +254,9 @@ func ExamplePubSub_Receive() {
|
||||||
}
|
}
|
||||||
fmt.Println(n, "clients received message")
|
fmt.Println(n, "clients received message")
|
||||||
|
|
||||||
for {
|
for i := 0; i < 2; i++ {
|
||||||
// ReceiveTimeout is a low level API. Use ReceiveMessage instead.
|
// 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 {
|
if err != nil {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue