mirror of
https://github.com/redis/go-redis.git
synced 2025-06-12 14:21:52 +03:00
Added the support for WAITAOF which is a new command in redis ver7.2.0 (#2629)
* implemented WaitAOF command for the redis ver7.2.0 * updated the test corresponding to WaitAOF --------- Co-authored-by: Chayim <chayim@users.noreply.github.com> Co-authored-by: ofekshenawa <104765379+ofekshenawa@users.noreply.github.com>
This commit is contained in:
@ -95,6 +95,18 @@ var _ = Describe("Commands", func() {
|
||||
Expect(time.Now()).To(BeTemporally("~", start.Add(wait), 3*time.Second))
|
||||
})
|
||||
|
||||
It("should WaitAOF", func() {
|
||||
const waitAOF = 3 * time.Second
|
||||
Skip("flaky test")
|
||||
|
||||
// assuming that the redis instance doesn't have AOF enabled
|
||||
start := time.Now()
|
||||
val, err := client.WaitAOF(ctx, 1, 1, waitAOF).Result()
|
||||
Expect(err).NotTo(HaveOccurred())
|
||||
Expect(val).NotTo(ContainSubstring("ERR WAITAOF cannot be used when numlocal is set but appendonly is disabled"))
|
||||
Expect(time.Now()).To(BeTemporally("~", start.Add(waitAOF), 3*time.Second))
|
||||
})
|
||||
|
||||
It("should Select", func() {
|
||||
pipe := client.Pipeline()
|
||||
sel := pipe.Select(ctx, 1)
|
||||
|
Reference in New Issue
Block a user