@@ -510,22 +510,6 @@ var _ = Describe("Commands", func() {
510
510
expire := client .ExpireNX (ctx , "key" , 10 * time .Second )
511
511
Expect (expire .Err ()).NotTo (HaveOccurred ())
512
512
Expect (expire .Val ()).To (Equal (true ))
513
-
514
- ttl := client .TTL (ctx , "key" )
515
- Expect (ttl .Err ()).NotTo (HaveOccurred ())
516
- Expect (ttl .Val ()).To (BeNumerically ("~" , 10 * time .Second , time .Second ))
517
-
518
- expire = client .ExpireNX (ctx , "key" , 10 * time .Second )
519
- Expect (expire .Err ()).NotTo (HaveOccurred ())
520
- Expect (expire .Val ()).To (Equal (false ))
521
-
522
- set = client .Set (ctx , "key" , "Hello World" , 0 )
523
- Expect (set .Err ()).NotTo (HaveOccurred ())
524
- Expect (set .Val ()).To (Equal ("OK" ))
525
-
526
- ttl = client .TTL (ctx , "key" )
527
- Expect (ttl .Err ()).NotTo (HaveOccurred ())
528
- Expect (ttl .Val ()).To (Equal (time .Duration (- 1 )))
529
513
})
530
514
531
515
It ("should ExpireXX" , func () {
@@ -548,26 +532,14 @@ var _ = Describe("Commands", func() {
548
532
ttl := client .TTL (ctx , "key" )
549
533
Expect (ttl .Err ()).NotTo (HaveOccurred ())
550
534
Expect (ttl .Val ()).To (BeNumerically ("~" , 20 * time .Second , 10 * time .Second ))
551
-
552
- set = client .Set (ctx , "key" , "Hello World" , 0 )
553
- Expect (set .Err ()).NotTo (HaveOccurred ())
554
- Expect (set .Val ()).To (Equal ("OK" ))
555
-
556
- ttl = client .TTL (ctx , "key" )
557
- Expect (ttl .Err ()).NotTo (HaveOccurred ())
558
- Expect (ttl .Val ()).To (Equal (time .Duration (- 1 )))
559
535
})
560
536
561
537
It ("should ExpireGT" , func () {
562
- set := client .Set (ctx , "key" , "Hello" , 0 )
538
+ set := client .Set (ctx , "key" , "Hello" , 10 * time . Second )
563
539
Expect (set .Err ()).NotTo (HaveOccurred ())
564
540
Expect (set .Val ()).To (Equal ("OK" ))
565
541
566
- expire := client .Expire (ctx , "key" , 10 * time .Second )
567
- Expect (expire .Err ()).NotTo (HaveOccurred ())
568
- Expect (expire .Val ()).To (Equal (true ))
569
-
570
- expire = client .ExpireGT (ctx , "key" , 5 * time .Second )
542
+ expire := client .ExpireGT (ctx , "key" , 5 * time .Second )
571
543
Expect (expire .Err ()).NotTo (HaveOccurred ())
572
544
Expect (expire .Val ()).To (Equal (false ))
573
545
@@ -578,14 +550,6 @@ var _ = Describe("Commands", func() {
578
550
ttl := client .TTL (ctx , "key" )
579
551
Expect (ttl .Err ()).NotTo (HaveOccurred ())
580
552
Expect (ttl .Val ()).To (BeNumerically ("~" , 20 * time .Second , 10 * time .Second ))
581
-
582
- set = client .Set (ctx , "key" , "Hello World" , 0 )
583
- Expect (set .Err ()).NotTo (HaveOccurred ())
584
- Expect (set .Val ()).To (Equal ("OK" ))
585
-
586
- ttl = client .TTL (ctx , "key" )
587
- Expect (ttl .Err ()).NotTo (HaveOccurred ())
588
- Expect (ttl .Val ()).To (Equal (time .Duration (- 1 )))
589
553
})
590
554
591
555
It ("should ExpireLT" , func () {
@@ -604,14 +568,6 @@ var _ = Describe("Commands", func() {
604
568
ttl := client .TTL (ctx , "key" )
605
569
Expect (ttl .Err ()).NotTo (HaveOccurred ())
606
570
Expect (ttl .Val ()).To (BeNumerically ("~" , 5 * time .Second , time .Second ))
607
-
608
- set = client .Set (ctx , "key" , "Hello World" , 0 )
609
- Expect (set .Err ()).NotTo (HaveOccurred ())
610
- Expect (set .Val ()).To (Equal ("OK" ))
611
-
612
- ttl = client .TTL (ctx , "key" )
613
- Expect (ttl .Err ()).NotTo (HaveOccurred ())
614
- Expect (ttl .Val ()).To (Equal (time .Duration (- 1 )))
615
571
})
616
572
617
573
It ("should ExpireAt" , func () {
0 commit comments