@@ -510,22 +510,6 @@ var _ = Describe("Commands", func() {
510510 expire := client .ExpireNX (ctx , "key" , 10 * time .Second )
511511 Expect (expire .Err ()).NotTo (HaveOccurred ())
512512 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 )))
529513 })
530514
531515 It ("should ExpireXX" , func () {
@@ -548,26 +532,14 @@ var _ = Describe("Commands", func() {
548532 ttl := client .TTL (ctx , "key" )
549533 Expect (ttl .Err ()).NotTo (HaveOccurred ())
550534 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 )))
559535 })
560536
561537 It ("should ExpireGT" , func () {
562- set := client .Set (ctx , "key" , "Hello" , 0 )
538+ set := client .Set (ctx , "key" , "Hello" , 10 * time . Second )
563539 Expect (set .Err ()).NotTo (HaveOccurred ())
564540 Expect (set .Val ()).To (Equal ("OK" ))
565541
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 )
571543 Expect (expire .Err ()).NotTo (HaveOccurred ())
572544 Expect (expire .Val ()).To (Equal (false ))
573545
@@ -578,14 +550,6 @@ var _ = Describe("Commands", func() {
578550 ttl := client .TTL (ctx , "key" )
579551 Expect (ttl .Err ()).NotTo (HaveOccurred ())
580552 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 )))
589553 })
590554
591555 It ("should ExpireLT" , func () {
@@ -604,14 +568,6 @@ var _ = Describe("Commands", func() {
604568 ttl := client .TTL (ctx , "key" )
605569 Expect (ttl .Err ()).NotTo (HaveOccurred ())
606570 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 )))
615571 })
616572
617573 It ("should ExpireAt" , func () {
0 commit comments