From 8efc44995ecf3c19471d85e44454aab271ef22d7 Mon Sep 17 00:00:00 2001 From: Binbin Date: Fri, 10 Jan 2025 12:17:58 +0800 Subject: [PATCH] Add tests Signed-off-by: Binbin --- tests/unit/latency-monitor.tcl | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tests/unit/latency-monitor.tcl b/tests/unit/latency-monitor.tcl index 9048192a44..e4f45389d7 100644 --- a/tests/unit/latency-monitor.tcl +++ b/tests/unit/latency-monitor.tcl @@ -189,3 +189,15 @@ tags {"needs:debug"} { assert_match "*wrong number of arguments for 'latency|help' command" $e } } + +start_cluster 1 1 {tags {"latency-monitor cluster external:skip needs:latency"} overrides {latency-monitor-threshold 1}} { + test "Cluster config file latency" { + # This test just a sanity test so that we can make sure the code path is cover. + # We don't assert anything since we can't be sure whether it will be counted. + R 0 cluster saveconfig + R 1 cluster saveconfig + R 1 cluster failover force + R 0 latency latest + R 1 latency latest + } +}