From 4e3be944fc9abd9b9638ad17589ff3c916394883 Mon Sep 17 00:00:00 2001 From: Binbin Date: Tue, 20 Feb 2024 14:43:13 +0800 Subject: [PATCH] Fix timing issue in blockedclient test (#13071) We can see that the past time here happens to be busy_time_limit, causing the test to fail: ``` [err]: RM_Call from blocked client in tests/unit/moduleapi/blockedclient.tcl Expected '50' to be more than '50' (context: type eval line 26 cmd {assert_morethan [expr [clock clicks -milliseconds]-$start] $busy_time_limit} proc ::test) ``` It is reasonable for them to be equal, so equal is added here. It should be noted that in the previous `Busy module command` test, we also used assert_morethan_equal, so this should have been missed at the time. --- tests/unit/moduleapi/blockedclient.tcl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/unit/moduleapi/blockedclient.tcl b/tests/unit/moduleapi/blockedclient.tcl index 073d30895..22b2c4bae 100644 --- a/tests/unit/moduleapi/blockedclient.tcl +++ b/tests/unit/moduleapi/blockedclient.tcl @@ -188,7 +188,7 @@ foreach call_type {nested normal} { # make sure we get BUSY error, and that we didn't get here too early assert_error {*BUSY Slow module operation*} {r ping} - assert_morethan [expr [clock clicks -milliseconds]-$start] $busy_time_limit + assert_morethan_equal [expr [clock clicks -milliseconds]-$start] $busy_time_limit # abort the blocking operation r set_slow_bg_operation 0