Skip to content

Commit

Permalink
fix test warn, the setex command does not support milliseconds
Browse files Browse the repository at this point in the history
Signed-off-by: monkey <[email protected]>
  • Loading branch information
monkey92t committed Mar 13, 2021
1 parent e722f52 commit e839f8e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions commands_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -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() {
Expand Down

0 comments on commit e839f8e

Please sign in to comment.