mirror of
https://github.com/redis/go-redis.git
synced 2025-09-10 07:11:50 +03:00
chore: gofmt all code
This commit is contained in:
@@ -472,11 +472,11 @@ var _ = Describe("Commands", func() {
|
||||
idleTime := client.ObjectIdleTime(ctx, "key")
|
||||
Expect(idleTime.Err()).NotTo(HaveOccurred())
|
||||
|
||||
//Redis returned milliseconds/1000, which may cause ObjectIdleTime to be at a critical value,
|
||||
//should be +1s to deal with the critical value problem.
|
||||
//if too much time (>1s) is used during command execution, it may also cause the test to fail.
|
||||
//so the ObjectIdleTime result should be <=now-start+1s
|
||||
//link: https://github.com/redis/redis/blob/5b48d900498c85bbf4772c1d466c214439888115/src/object.c#L1265-L1272
|
||||
// Redis returned milliseconds/1000, which may cause ObjectIdleTime to be at a critical value,
|
||||
// should be +1s to deal with the critical value problem.
|
||||
// if too much time (>1s) is used during command execution, it may also cause the test to fail.
|
||||
// so the ObjectIdleTime result should be <=now-start+1s
|
||||
// link: https://github.com/redis/redis/blob/5b48d900498c85bbf4772c1d466c214439888115/src/object.c#L1265-L1272
|
||||
Expect(idleTime.Val()).To(BeNumerically("<=", time.Now().Sub(start)+time.Second))
|
||||
})
|
||||
|
||||
|
Reference in New Issue
Block a user