add miss Pipeline and TxPipeline

Signed-off-by: monkey <golang@88.com>
This commit is contained in:
monkey 2021-03-07 17:34:40 +08:00
parent 783725f3f7
commit 4a7d03359b
1 changed files with 117 additions and 114 deletions

View File

@ -188,13 +188,15 @@ var _ = Describe("Redis Ring", func() {
}) })
}) })
It("supports Process hook", func() { Describe("Process hook", func() {
BeforeEach(func() {
//the health check leads to data race for variable "stack []string". //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 //here, the health check time is set to 72 hours to avoid health check
opt := redisRingOptions() opt := redisRingOptions()
opt.HeartbeatFrequency = 72 * time.Hour opt.HeartbeatFrequency = 72 * time.Hour
ring = redis.NewRing(opt) ring = redis.NewRing(opt)
})
It("supports Process hook", func() {
err := ring.Ping(ctx).Err() err := ring.Ping(ctx).Err()
Expect(err).NotTo(HaveOccurred()) Expect(err).NotTo(HaveOccurred())
@ -343,6 +345,7 @@ var _ = Describe("Redis Ring", func() {
})) }))
}) })
}) })
})
var _ = Describe("empty Redis Ring", func() { var _ = Describe("empty Redis Ring", func() {
var ring *redis.Ring var ring *redis.Ring