forked from mirror/redis
cluster: preload commands info
This commit is contained in:
parent
e693227e84
commit
bdf8f06904
|
@ -653,6 +653,8 @@ func NewClusterClient(opt *ClusterOptions) *ClusterClient {
|
|||
c.init()
|
||||
|
||||
_, _ = c.state.Reload()
|
||||
_, _ = c.cmdsInfoCache.Get()
|
||||
|
||||
if opt.IdleCheckFrequency > 0 {
|
||||
go c.reaper(opt.IdleCheckFrequency)
|
||||
}
|
||||
|
|
|
@ -853,8 +853,8 @@ var _ = Describe("ClusterClient timeout", func() {
|
|||
Context("read/write timeout", func() {
|
||||
BeforeEach(func() {
|
||||
opt := redisClusterOptions()
|
||||
opt.ReadTimeout = 300 * time.Millisecond
|
||||
opt.WriteTimeout = 300 * time.Millisecond
|
||||
opt.ReadTimeout = 250 * time.Millisecond
|
||||
opt.WriteTimeout = 250 * time.Millisecond
|
||||
opt.MaxRedirects = 1
|
||||
client = cluster.clusterClient(opt)
|
||||
|
||||
|
|
Loading…
Reference in New Issue