From e839f8e764b4553691546a37d13e96cb943d173a Mon Sep 17 00:00:00 2001 From: monkey Date: Sat, 13 Mar 2021 23:07:57 +0800 Subject: [PATCH] fix test warn, the setex command does not support milliseconds Signed-off-by: monkey --- commands_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/commands_test.go b/commands_test.go index 5181174d..d7900fc6 100644 --- a/commands_test.go +++ b/commands_test.go @@ -1465,7 +1465,7 @@ var _ = Describe("Commands", func() { }) It("should SetEX", func() { - err := client.SetEX(ctx, "key", "hello", 100*time.Millisecond).Err() + err := client.SetEX(ctx, "key", "hello", 1*time.Second).Err() Expect(err).NotTo(HaveOccurred()) val, err := client.Get(ctx, "key").Result() @@ -1474,7 +1474,7 @@ var _ = Describe("Commands", func() { Eventually(func() error { return client.Get(ctx, "foo").Err() - }, "1s", "100ms").Should(Equal(redis.Nil)) + }, "2s", "100ms").Should(Equal(redis.Nil)) }) It("should SetNX", func() {