@@ -2486,31 +2486,31 @@ var _ = Describe("Commands", func() {
2486
2486
})
2487
2487
2488
2488
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 ()
2490
2490
Expect (err ).To (BeNil ())
2491
- Expect (resEmpty ).To (BeEquivalentTo ([]int64 {- 2 , - 2 , - 2 }))
2491
+ Expect (res ).To (BeEquivalentTo ([]int64 {- 2 , - 2 , - 2 }))
2492
2492
2493
2493
for i := 0 ; i < 100 ; i ++ {
2494
2494
sadd := client .HSet (ctx , "myhash" , fmt .Sprintf ("key%d" , i ), "hello" )
2495
2495
Expect (sadd .Err ()).NotTo (HaveOccurred ())
2496
2496
}
2497
2497
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 ()
2499
2499
Expect (err ).NotTo (HaveOccurred ())
2500
2500
Expect (res ).To (Equal ([]int64 {1 , 1 , - 2 }))
2501
2501
})
2502
2502
2503
2503
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 ()
2505
2505
Expect (err ).To (BeNil ())
2506
- Expect (resEmpty ).To (BeEquivalentTo ([]int64 {- 2 , - 2 , - 2 }))
2506
+ Expect (res ).To (BeEquivalentTo ([]int64 {- 2 , - 2 , - 2 }))
2507
2507
2508
2508
for i := 0 ; i < 100 ; i ++ {
2509
2509
sadd := client .HSet (ctx , "myhash" , fmt .Sprintf ("key%d" , i ), "hello" )
2510
2510
Expect (sadd .Err ()).NotTo (HaveOccurred ())
2511
2511
}
2512
2512
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 ()
2514
2514
Expect (err ).NotTo (HaveOccurred ())
2515
2515
Expect (res ).To (Equal ([]int64 {1 , 1 , - 2 }))
2516
2516
})
@@ -2559,7 +2559,7 @@ var _ = Describe("Commands", func() {
2559
2559
Expect (err ).NotTo (HaveOccurred ())
2560
2560
Expect (res ).To (Equal ([]int64 {- 1 , - 1 , - 2 }))
2561
2561
2562
- res , err = client .HExpire (ctx , "myhash" , 10 , "key1" , "key200" ).Result ()
2562
+ res , err = client .HExpire (ctx , "myhash" , 10 * time . Second , "key1" , "key200" ).Result ()
2563
2563
Expect (err ).NotTo (HaveOccurred ())
2564
2564
Expect (res ).To (Equal ([]int64 {1 , - 2 }))
2565
2565
@@ -2578,7 +2578,7 @@ var _ = Describe("Commands", func() {
2578
2578
Expect (sadd .Err ()).NotTo (HaveOccurred ())
2579
2579
}
2580
2580
2581
- res , err := client .HExpire (ctx , "myhash" , 10 , "key1" , "key200" ).Result ()
2581
+ res , err := client .HExpire (ctx , "myhash" , 10 * time . Second , "key1" , "key200" ).Result ()
2582
2582
Expect (err ).NotTo (HaveOccurred ())
2583
2583
Expect (res ).To (Equal ([]int64 {1 , - 2 }))
2584
2584
@@ -2617,7 +2617,7 @@ var _ = Describe("Commands", func() {
2617
2617
Expect (sadd .Err ()).NotTo (HaveOccurred ())
2618
2618
}
2619
2619
2620
- res , err := client .HExpire (ctx , "myhash" , 10 , "key1" , "key200" ).Result ()
2620
+ res , err := client .HExpire (ctx , "myhash" , 10 * time . Second , "key1" , "key200" ).Result ()
2621
2621
Expect (err ).NotTo (HaveOccurred ())
2622
2622
Expect (res ).To (Equal ([]int64 {1 , - 2 }))
2623
2623
@@ -2636,7 +2636,7 @@ var _ = Describe("Commands", func() {
2636
2636
Expect (sadd .Err ()).NotTo (HaveOccurred ())
2637
2637
}
2638
2638
2639
- res , err := client .HExpire (ctx , "myhash" , 10 , "key1" , "key200" ).Result ()
2639
+ res , err := client .HExpire (ctx , "myhash" , 10 * time . Second , "key1" , "key200" ).Result ()
2640
2640
Expect (err ).NotTo (HaveOccurred ())
2641
2641
Expect (res ).To (Equal ([]int64 {1 , - 2 }))
2642
2642
0 commit comments