mirror of
https://github.com/redis/go-redis.git
synced 2025-08-06 01:35:48 +03:00
fix test warn, the setex command does not support milliseconds
Signed-off-by: monkey <golang@88.com>
This commit is contained in:
@@ -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() {
|
||||||
|
Reference in New Issue
Block a user