@@ -2486,31 +2486,31 @@ var _ = Describe("Commands", func() {
24862486 })
24872487
24882488 It ("should HExpire" , Label ("hash-expiration" , "NonRedisEnterprise" ), func () {
2489- resEmpty , err := client .HExpire (ctx , "no_such_key" , 10 , "field1" , "field2" , "field3" ).Result ()
2489+ res , err := client .HExpire (ctx , "no_such_key" , 10 * time . Second , "field1" , "field2" , "field3" ).Result ()
24902490 Expect (err ).To (BeNil ())
2491- Expect (resEmpty ).To (BeEquivalentTo ([]int64 {- 2 , - 2 , - 2 }))
2491+ Expect (res ).To (BeEquivalentTo ([]int64 {- 2 , - 2 , - 2 }))
24922492
24932493 for i := 0 ; i < 100 ; i ++ {
24942494 sadd := client .HSet (ctx , "myhash" , fmt .Sprintf ("key%d" , i ), "hello" )
24952495 Expect (sadd .Err ()).NotTo (HaveOccurred ())
24962496 }
24972497
2498- res , err : = client .HExpire (ctx , "myhash" , 10 , "key1" , "key2" , "key200" ).Result ()
2498+ res , err = client .HExpire (ctx , "myhash" , 10 * time . Second , "key1" , "key2" , "key200" ).Result ()
24992499 Expect (err ).NotTo (HaveOccurred ())
25002500 Expect (res ).To (Equal ([]int64 {1 , 1 , - 2 }))
25012501 })
25022502
25032503 It ("should HPExpire" , Label ("hash-expiration" , "NonRedisEnterprise" ), func () {
2504- resEmpty , err := client .HPExpire (ctx , "no_such_key" , 10 , "field1" , "field2" , "field3" ).Result ()
2504+ res , err := client .HPExpire (ctx , "no_such_key" , 10 * time . Second , "field1" , "field2" , "field3" ).Result ()
25052505 Expect (err ).To (BeNil ())
2506- Expect (resEmpty ).To (BeEquivalentTo ([]int64 {- 2 , - 2 , - 2 }))
2506+ Expect (res ).To (BeEquivalentTo ([]int64 {- 2 , - 2 , - 2 }))
25072507
25082508 for i := 0 ; i < 100 ; i ++ {
25092509 sadd := client .HSet (ctx , "myhash" , fmt .Sprintf ("key%d" , i ), "hello" )
25102510 Expect (sadd .Err ()).NotTo (HaveOccurred ())
25112511 }
25122512
2513- res , err : = client .HPExpire (ctx , "myhash" , 10 , "key1" , "key2" , "key200" ).Result ()
2513+ res , err = client .HPExpire (ctx , "myhash" , 10 * time . Second , "key1" , "key2" , "key200" ).Result ()
25142514 Expect (err ).NotTo (HaveOccurred ())
25152515 Expect (res ).To (Equal ([]int64 {1 , 1 , - 2 }))
25162516 })
@@ -2559,7 +2559,7 @@ var _ = Describe("Commands", func() {
25592559 Expect (err ).NotTo (HaveOccurred ())
25602560 Expect (res ).To (Equal ([]int64 {- 1 , - 1 , - 2 }))
25612561
2562- res , err = client .HExpire (ctx , "myhash" , 10 , "key1" , "key200" ).Result ()
2562+ res , err = client .HExpire (ctx , "myhash" , 10 * time . Second , "key1" , "key200" ).Result ()
25632563 Expect (err ).NotTo (HaveOccurred ())
25642564 Expect (res ).To (Equal ([]int64 {1 , - 2 }))
25652565
@@ -2578,7 +2578,7 @@ var _ = Describe("Commands", func() {
25782578 Expect (sadd .Err ()).NotTo (HaveOccurred ())
25792579 }
25802580
2581- res , err := client .HExpire (ctx , "myhash" , 10 , "key1" , "key200" ).Result ()
2581+ res , err := client .HExpire (ctx , "myhash" , 10 * time . Second , "key1" , "key200" ).Result ()
25822582 Expect (err ).NotTo (HaveOccurred ())
25832583 Expect (res ).To (Equal ([]int64 {1 , - 2 }))
25842584
@@ -2617,7 +2617,7 @@ var _ = Describe("Commands", func() {
26172617 Expect (sadd .Err ()).NotTo (HaveOccurred ())
26182618 }
26192619
2620- res , err := client .HExpire (ctx , "myhash" , 10 , "key1" , "key200" ).Result ()
2620+ res , err := client .HExpire (ctx , "myhash" , 10 * time . Second , "key1" , "key200" ).Result ()
26212621 Expect (err ).NotTo (HaveOccurred ())
26222622 Expect (res ).To (Equal ([]int64 {1 , - 2 }))
26232623
@@ -2636,7 +2636,7 @@ var _ = Describe("Commands", func() {
26362636 Expect (sadd .Err ()).NotTo (HaveOccurred ())
26372637 }
26382638
2639- res , err := client .HExpire (ctx , "myhash" , 10 , "key1" , "key200" ).Result ()
2639+ res , err := client .HExpire (ctx , "myhash" , 10 * time . Second , "key1" , "key200" ).Result ()
26402640 Expect (err ).NotTo (HaveOccurred ())
26412641 Expect (res ).To (Equal ([]int64 {1 , - 2 }))
26422642
0 commit comments