fix test warn, the setex command does not support milliseconds

Signed-off-by: monkey <golang@88.com>
This commit is contained in:
monkey 2021-03-13 23:07:57 +08:00
parent e722f52cf8
commit e839f8e764
1 changed files with 2 additions and 2 deletions

View File

@ -1465,7 +1465,7 @@ var _ = Describe("Commands", func() {
}) })
It("should SetEX", 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()) Expect(err).NotTo(HaveOccurred())
val, err := client.Get(ctx, "key").Result() val, err := client.Get(ctx, "key").Result()
@ -1474,7 +1474,7 @@ var _ = Describe("Commands", func() {
Eventually(func() error { Eventually(func() error {
return client.Get(ctx, "foo").Err() return client.Get(ctx, "foo").Err()
}, "1s", "100ms").Should(Equal(redis.Nil)) }, "2s", "100ms").Should(Equal(redis.Nil))
}) })
It("should SetNX", func() { It("should SetNX", func() {