summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOran Agra <oran@redislabs.com>2022-04-19 14:57:28 +0300
committerGitHub <noreply@github.com>2022-04-19 14:57:28 +0300
commita1c85eebf4aaac0727456329e2f18bd99d23dfbe (patch)
tree654e35c54b3e9e3ac3c2d51e22690525bbf1f702
parent295cbf297f3ec1ccb0bb07559bedaf441936d249 (diff)
downloadredis-a1c85eebf4aaac0727456329e2f18bd99d23dfbe.tar.gz
Tests: improve skip tags around maxmemory and resp3 (#10597)
some skip tags where missing on some tests....
-rw-r--r--tests/unit/functions.tcl8
-rw-r--r--tests/unit/scripting.tcl4
-rw-r--r--tests/unit/type/list.tcl6
-rw-r--r--tests/unit/type/zset.tcl23
4 files changed, 24 insertions, 17 deletions
diff --git a/tests/unit/functions.tcl b/tests/unit/functions.tcl
index 4c08261ed..1360d2fef 100644
--- a/tests/unit/functions.tcl
+++ b/tests/unit/functions.tcl
@@ -986,7 +986,7 @@ start_server {tags {"scripting"}} {
assert_match {*command not allowed when used memory*} $e
r config set maxmemory 0
- }
+ } {OK} {needs:config-maxmemory}
test {FUNCTION - verify allow-omm allows running any command} {
r FUNCTION load replace {#!lua name=f1
@@ -1003,7 +1003,7 @@ start_server {tags {"scripting"}} {
assert_match {1} [r get x]
r config set maxmemory 0
- }
+ } {OK} {needs:config-maxmemory}
}
start_server {tags {"scripting"}} {
@@ -1074,7 +1074,7 @@ start_server {tags {"scripting"}} {
assert_match {*can not run it when used memory > 'maxmemory'*} $e
r config set maxmemory 0
- }
+ } {OK} {needs:config-maxmemory}
test {FUNCTION - deny oom on no-writes function} {
r FUNCTION load replace {#!lua name=test
@@ -1090,7 +1090,7 @@ start_server {tags {"scripting"}} {
assert_match {*can not run it when used memory > 'maxmemory'*} $e
r config set maxmemory 0
- }
+ } {OK} {needs:config-maxmemory}
test {FUNCTION - allow stale} {
r FUNCTION load replace {#!lua name=test
diff --git a/tests/unit/scripting.tcl b/tests/unit/scripting.tcl
index 1b8ae6df8..a5a253325 100644
--- a/tests/unit/scripting.tcl
+++ b/tests/unit/scripting.tcl
@@ -52,7 +52,7 @@ start_server {tags {"scripting"}} {
assert_match {*command not allowed when used memory*} $e
r config set maxmemory 0
- }
+ } {OK} {needs:config-maxmemory}
} ;# is_eval
test {EVAL - Does Lua interpreter replies to our requests?} {
@@ -1330,7 +1330,7 @@ start_server {tags {"scripting"}} {
] 1
r config set maxmemory 0
- }
+ } {OK} {needs:config-maxmemory}
test "no-writes shebang flag" {
assert_error {ERR Write commands are not allowed from read-only scripts*} {
diff --git a/tests/unit/type/list.tcl b/tests/unit/type/list.tcl
index ebc869e23..64d569d08 100644
--- a/tests/unit/type/list.tcl
+++ b/tests/unit/type/list.tcl
@@ -510,7 +510,11 @@ start_server {
}
foreach resp {3 2} {
- r hello $resp
+ if {[lsearch $::denytags "resp3"] >= 0} {
+ if {$resp == 3} {continue}
+ } else {
+ r hello $resp
+ }
# Make sure we can distinguish between an empty array and a null response
r readraw 1
diff --git a/tests/unit/type/zset.tcl b/tests/unit/type/zset.tcl
index 3ccfa61ab..6df856e31 100644
--- a/tests/unit/type/zset.tcl
+++ b/tests/unit/type/zset.tcl
@@ -1223,11 +1223,20 @@ start_server {tags {"zset"}} {
} {} {needs:repl}
foreach resp {3 2} {
+ set rd [redis_deferring_client]
+
+ if {[lsearch $::denytags "resp3"] >= 0} {
+ if {$resp == 3} {continue}
+ } else {
+ r hello $resp
+ $rd hello $resp
+ $rd read
+ }
+
test "ZPOPMIN/ZPOPMAX readraw in RESP$resp" {
r del zset{t}
create_zset zset2{t} {1 a 2 b 3 c 4 d 5 e}
- r hello $resp
r readraw 1
# ZPOP against non existing key.
@@ -1260,9 +1269,6 @@ start_server {tags {"zset"}} {
r del zset{t}
create_zset zset2{t} {1 a 2 b 3 c 4 d 5 e}
- set rd [redis_deferring_client]
- $rd hello $resp
- $rd read
$rd readraw 1
# BZPOP released on timeout.
@@ -1291,7 +1297,7 @@ start_server {tags {"zset"}} {
assert_equal [$rd read] {a}
verify_score_response $rd $resp 1
- $rd close
+ $rd readraw 0
}
test "ZMPOP readraw in RESP$resp" {
@@ -1299,7 +1305,6 @@ start_server {tags {"zset"}} {
create_zset zset3{t} {1 a}
create_zset zset4{t} {1 a 2 b 3 c 4 d 5 e}
- r hello $resp
r readraw 1
# ZMPOP against non existing key.
@@ -1339,9 +1344,6 @@ start_server {tags {"zset"}} {
r del zset{t} zset2{t}
create_zset zset3{t} {1 a 2 b 3 c 4 d 5 e}
- set rd [redis_deferring_client]
- $rd hello $resp
- $rd read
$rd readraw 1
# BZMPOP released on timeout.
@@ -1380,8 +1382,9 @@ start_server {tags {"zset"}} {
assert_equal [$rd read] {b}
verify_score_response $rd $resp 2
- $rd close
}
+
+ $rd close
}
test {ZINTERSTORE regression with two sets, intset+hashtable} {