summaryrefslogtreecommitdiff
path: root/tests/unit/scripting.tcl
diff options
context:
space:
mode:
authorOran Agra <oran@redislabs.com>2021-02-01 20:11:42 +0200
committerGitHub <noreply@github.com>2021-02-01 20:11:42 +0200
commit2dba1e391d3772a8da182d95bde050ffa9d01e4d (patch)
tree3664bcd3ede605643a18668624f41c846b5e43ab /tests/unit/scripting.tcl
parentec2d180739aa3877a45ec54438c68a7659be5159 (diff)
parent95338f9cc41fdfd050f122789187db75fda1fe3c (diff)
downloadredis-6.2-rc3.tar.gz
Merge 6.2 RC36.2-rc3
Diffstat (limited to 'tests/unit/scripting.tcl')
-rw-r--r--tests/unit/scripting.tcl9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/unit/scripting.tcl b/tests/unit/scripting.tcl
index 6fd152594..3aa3c0fba 100644
--- a/tests/unit/scripting.tcl
+++ b/tests/unit/scripting.tcl
@@ -330,6 +330,15 @@ start_server {tags {"scripting"}} {
set e
} {NOSCRIPT*}
+ test {SCRIPTING FLUSH ASYNC} {
+ for {set j 0} {$j < 100} {incr j} {
+ r script load "return $j"
+ }
+ assert { [string match "*number_of_cached_scripts:100*" [r info Memory]] }
+ r script flush async
+ assert { [string match "*number_of_cached_scripts:0*" [r info Memory]] }
+ }
+
test {SCRIPT EXISTS - can detect already defined scripts?} {
r eval "return 1+1" 0
r script exists a27e7e8a43702b7046d4f6a7ccf5b60cef6b9bd9 a27e7e8a43702b7046d4f6a7ccf5b60cef6b9bda