Skip to content

Commit

Permalink
Update commands_test.go
Browse files Browse the repository at this point in the history
  • Loading branch information
monkey92t authored Jul 11, 2024
1 parent 516391f commit b2a5b2d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions commands_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2488,7 +2488,7 @@ var _ = Describe("Commands", func() {
It("should HExpire", Label("hash-expiration", "NonRedisEnterprise"), func() {
res, err := client.HExpire(ctx, "no_such_key", 10*time.Second, "field1", "field2", "field3").Result()
Expect(err).To(BeNil())
Expect(resEmpty).To(BeEquivalentTo([]int64{-2, -2, -2}))
Expect(res).To(BeEquivalentTo([]int64{-2, -2, -2}))

for i := 0; i < 100; i++ {
sadd := client.HSet(ctx, "myhash", fmt.Sprintf("key%d", i), "hello")
Expand All @@ -2501,16 +2501,16 @@ var _ = Describe("Commands", func() {
})

It("should HPExpire", Label("hash-expiration", "NonRedisEnterprise"), func() {
_, err := client.HPExpire(ctx, "no_such_key", 10*time.Second, "field1", "field2", "field3").Result()
res, err := client.HPExpire(ctx, "no_such_key", 10*time.Second, "field1", "field2", "field3").Result()
Expect(err).To(BeNil())
Expect(resEmpty).To(BeEquivalentTo([]int64{-2, -2, -2}))
Expect(res).To(BeEquivalentTo([]int64{-2, -2, -2}))

for i := 0; i < 100; i++ {
sadd := client.HSet(ctx, "myhash", fmt.Sprintf("key%d", i), "hello")
Expect(sadd.Err()).NotTo(HaveOccurred())
}

res, err := client.HPExpire(ctx, "myhash", 10*time.Second, "key1", "key2", "key200").Result()
res, err = client.HPExpire(ctx, "myhash", 10*time.Second, "key1", "key2", "key200").Result()
Expect(err).NotTo(HaveOccurred())
Expect(res).To(Equal([]int64{1, 1, -2}))
})
Expand Down

0 comments on commit b2a5b2d

Please sign in to comment.