From 60f7111b11a45afbcb6d21adb51da423cf19095c Mon Sep 17 00:00:00 2001 From: Oran Agra Date: Sun, 18 Dec 2022 17:07:46 +0200 Subject: [PATCH] fix flaky latency test (#11636) Fix a flaky test that probably fails on overload timing issues. This unit starts with ``` # Set a threshold high enough to avoid spurious latency events. r config set latency-monitor-threshold 200 ``` but later the test measuring expire event changes the threshold. this fix is to revert it to 200 after that test. Got this error (ARM+TLS) ``` *** [err]: LATENCY RESET is able to reset events in tests/unit/latency-monitor.tcl Expected [r latency latest] eq {} (context: type eval line 3 cmd {assert {[r latency latest] eq {}}} proc ::test) ``` --- tests/unit/latency-monitor.tcl | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/unit/latency-monitor.tcl b/tests/unit/latency-monitor.tcl index 39d404d55..d592ed95b 100644 --- a/tests/unit/latency-monitor.tcl +++ b/tests/unit/latency-monitor.tcl @@ -124,6 +124,7 @@ start_server {tags {"latency-monitor needs:latency"}} { fail "key wasn't expired" } assert_match {*expire-cycle*} [r latency latest] + r config set latency-monitor-threshold 200 } test {LATENCY HISTORY / RESET with wrong event name is fine} {