1
0
mirror of https://github.com/redis/go-redis.git synced 2025-07-28 06:42:00 +03:00
This commit is contained in:
Vladimir Mihailenco
2018-08-06 13:59:15 +03:00
parent 464daeb271
commit 96d1b85009
8 changed files with 61 additions and 39 deletions

View File

@ -727,15 +727,20 @@ var _ = Describe("ClusterClient", func() {
Eventually(func() int64 {
return slave.DBSize().Val()
}, 30*time.Second).Should(Equal(int64(0)))
}, "30s").Should(Equal(int64(0)))
return nil
})
Expect(err).NotTo(HaveOccurred())
state, err := client.LoadState()
Expect(err).NotTo(HaveOccurred())
Expect(state.IsConsistent()).To(BeTrue())
Eventually(func() bool {
state, err = client.LoadState()
if err != nil {
return false
}
return state.IsConsistent()
}, "30s").Should(BeTrue())
for _, slave := range state.Slaves {
err = slave.Client.ClusterFailover().Err()
@ -744,7 +749,7 @@ var _ = Describe("ClusterClient", func() {
Eventually(func() bool {
state, _ := client.LoadState()
return state.IsConsistent()
}, 30*time.Second).Should(BeTrue())
}, "30s").Should(BeTrue())
}
})