mirror of
https://github.com/redis/go-redis.git
synced 2025-04-26 21:08:50 +03:00
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…
x
Reference in New Issue
Block a user