summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorViktor Söderqvist <viktor.soderqvist@est.tech>2021-02-28 13:11:18 +0100
committerGitHub <noreply@github.com>2021-02-28 14:11:18 +0200
commit6122f1c450846584eedf614551de0c97da305b45 (patch)
treec417866fb76551227649ea4be5eb02828d9c41fd /tests
parent4a474843fbd018cd323971b57dec976d7ad0278d (diff)
downloadredis-6122f1c450846584eedf614551de0c97da305b45.tar.gz
Shared reusable client for RM_Call() (#8516)
A single client pointer is added in the server struct. This is initialized by the first RM_Call() and reused for every subsequent RM_Call() except if it's already in use, which means that it's not used for (recursive) module calls to modules. For these, a new "fake" client is created each time. Other changes: * Avoid allocating a dict iterator in pubsubUnsubscribeAllChannels when not needed
Diffstat (limited to 'tests')
-rw-r--r--tests/unit/moduleapi/misc.tcl5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/unit/moduleapi/misc.tcl b/tests/unit/moduleapi/misc.tcl
index d60ccca8f..b5cd6100c 100644
--- a/tests/unit/moduleapi/misc.tcl
+++ b/tests/unit/moduleapi/misc.tcl
@@ -16,6 +16,11 @@ start_server {tags {"modules"}} {
assert { [string match "*cmdstat_module*" $info] }
}
+ test {test RM_Call recursive} {
+ set info [r test.call_generic test.call_generic info commandstats]
+ assert { [string match "*cmdstat_module*" $info] }
+ }
+
test {test redis version} {
set version [s redis_version]
assert_equal $version [r test.redisversion]