mirror of https://github.com/go-redis/redis.git
fix ring test `supports Process hook` data race
Signed-off-by: monkey <golang@88.com>
This commit is contained in:
parent
f3a31a3e2c
commit
783725f3f7
|
@ -189,6 +189,12 @@ var _ = Describe("Redis Ring", func() {
|
||||||
})
|
})
|
||||||
|
|
||||||
It("supports Process hook", func() {
|
It("supports Process hook", func() {
|
||||||
|
//the health check leads to data race for variable "stack []string".
|
||||||
|
//here, the health check time is set to 72 hours to avoid health check
|
||||||
|
opt := redisRingOptions()
|
||||||
|
opt.HeartbeatFrequency = 72 * time.Hour
|
||||||
|
ring = redis.NewRing(opt)
|
||||||
|
|
||||||
err := ring.Ping(ctx).Err()
|
err := ring.Ping(ctx).Err()
|
||||||
Expect(err).NotTo(HaveOccurred())
|
Expect(err).NotTo(HaveOccurred())
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue