Skip to content

Commit 783725f

Browse files
committed
fix ring test supports Process hook data race
Signed-off-by: monkey <[email protected]>
1 parent f3a31a3 commit 783725f

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

ring_test.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,12 @@ var _ = Describe("Redis Ring", func() {
189189
})
190190

191191
It("supports Process hook", func() {
192+
//the health check leads to data race for variable "stack []string".
193+
//here, the health check time is set to 72 hours to avoid health check
194+
opt := redisRingOptions()
195+
opt.HeartbeatFrequency = 72 * time.Hour
196+
ring = redis.NewRing(opt)
197+
192198
err := ring.Ping(ctx).Err()
193199
Expect(err).NotTo(HaveOccurred())
194200

0 commit comments

Comments
 (0)