@@ -8870,11 +8870,15 @@ var _ = Describe("Commands", func() {
88708870 It ("returns latencies" , func () {
88718871 const key = "latency-monitor-threshold"
88728872
8873+ // reset all latencies first to ensure clean state
8874+ err := client .LatencyReset (ctx ).Err ()
8875+ Expect (err ).NotTo (HaveOccurred ())
8876+
88738877 old := client .ConfigGet (ctx , key ).Val ()
88748878 client .ConfigSet (ctx , key , "1" )
88758879 defer client .ConfigSet (ctx , key , old [key ])
88768880
8877- err : = client .Do (ctx , "DEBUG" , "SLEEP" , 0.01 ).Err ()
8881+ err = client .Do (ctx , "DEBUG" , "SLEEP" , 0.01 ).Err ()
88788882 Expect (err ).NotTo (HaveOccurred ())
88798883
88808884 result , err := client .Latency (ctx ).Result ()
@@ -8921,6 +8925,10 @@ var _ = Describe("Commands", func() {
89218925 It ("reset latencies by add event name args" , func () {
89228926 const key = "latency-monitor-threshold"
89238927
8928+ // reset all latencies first to ensure clean state
8929+ err := client .LatencyReset (ctx ).Err ()
8930+ Expect (err ).NotTo (HaveOccurred ())
8931+
89248932 old := client .ConfigGet (ctx , key ).Val ()
89258933 client .ConfigSet (ctx , key , "1" )
89268934 defer client .ConfigSet (ctx , key , old [key ])
0 commit comments