Skip to content

Commit

Permalink
Merge pull request redis#1672 from monkey92t/test_error
Browse files Browse the repository at this point in the history
solve possible unit test errors in ring_test.go
  • Loading branch information
vmihailenco authored Feb 25, 2021
2 parents e5cde8f + f4ae0ba commit 00eeb1c
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions ring_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -533,6 +533,16 @@ var _ = Describe("Ring watch", func() {
})

It("respects max size on multi", func() {
//this test checks the number of "pool.conn"
//if the health check is performed at the same time
//conn will be used, resulting in an abnormal number of "pool.conn".
//
//redis.NewRing() does not have an option to prohibit health checks.
//set a relatively large time here to avoid health checks.
opt := redisRingOptions()
opt.HeartbeatFrequency = 72 * time.Hour
ring = redis.NewRing(opt)

perform(1000, func(id int) {
var ping *redis.StatusCmd

Expand Down

0 comments on commit 00eeb1c

Please sign in to comment.