Unverified Commit a1c85eeb authored by Oran Agra's avatar Oran Agra Committed by GitHub
Browse files

Tests: improve skip tags around maxmemory and resp3 (#10597)

some skip tags where missing on some tests....
parent 295cbf29
...@@ -986,7 +986,7 @@ start_server {tags {"scripting"}} { ...@@ -986,7 +986,7 @@ start_server {tags {"scripting"}} {
assert_match {*command not allowed when used memory*} $e assert_match {*command not allowed when used memory*} $e
r config set maxmemory 0 r config set maxmemory 0
} } {OK} {needs:config-maxmemory}
test {FUNCTION - verify allow-omm allows running any command} { test {FUNCTION - verify allow-omm allows running any command} {
r FUNCTION load replace {#!lua name=f1 r FUNCTION load replace {#!lua name=f1
...@@ -1003,7 +1003,7 @@ start_server {tags {"scripting"}} { ...@@ -1003,7 +1003,7 @@ start_server {tags {"scripting"}} {
assert_match {1} [r get x] assert_match {1} [r get x]
r config set maxmemory 0 r config set maxmemory 0
} } {OK} {needs:config-maxmemory}
} }
start_server {tags {"scripting"}} { start_server {tags {"scripting"}} {
...@@ -1074,7 +1074,7 @@ start_server {tags {"scripting"}} { ...@@ -1074,7 +1074,7 @@ start_server {tags {"scripting"}} {
assert_match {*can not run it when used memory > 'maxmemory'*} $e assert_match {*can not run it when used memory > 'maxmemory'*} $e
r config set maxmemory 0 r config set maxmemory 0
} } {OK} {needs:config-maxmemory}
test {FUNCTION - deny oom on no-writes function} { test {FUNCTION - deny oom on no-writes function} {
r FUNCTION load replace {#!lua name=test r FUNCTION load replace {#!lua name=test
...@@ -1090,7 +1090,7 @@ start_server {tags {"scripting"}} { ...@@ -1090,7 +1090,7 @@ start_server {tags {"scripting"}} {
assert_match {*can not run it when used memory > 'maxmemory'*} $e assert_match {*can not run it when used memory > 'maxmemory'*} $e
r config set maxmemory 0 r config set maxmemory 0
} } {OK} {needs:config-maxmemory}
test {FUNCTION - allow stale} { test {FUNCTION - allow stale} {
r FUNCTION load replace {#!lua name=test r FUNCTION load replace {#!lua name=test
......
...@@ -52,7 +52,7 @@ start_server {tags {"scripting"}} { ...@@ -52,7 +52,7 @@ start_server {tags {"scripting"}} {
assert_match {*command not allowed when used memory*} $e assert_match {*command not allowed when used memory*} $e
r config set maxmemory 0 r config set maxmemory 0
} } {OK} {needs:config-maxmemory}
} ;# is_eval } ;# is_eval
test {EVAL - Does Lua interpreter replies to our requests?} { test {EVAL - Does Lua interpreter replies to our requests?} {
...@@ -1330,7 +1330,7 @@ start_server {tags {"scripting"}} { ...@@ -1330,7 +1330,7 @@ start_server {tags {"scripting"}} {
] 1 ] 1
r config set maxmemory 0 r config set maxmemory 0
} } {OK} {needs:config-maxmemory}
test "no-writes shebang flag" { test "no-writes shebang flag" {
assert_error {ERR Write commands are not allowed from read-only scripts*} { assert_error {ERR Write commands are not allowed from read-only scripts*} {
......
...@@ -510,7 +510,11 @@ start_server { ...@@ -510,7 +510,11 @@ start_server {
} }
foreach resp {3 2} { 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 # Make sure we can distinguish between an empty array and a null response
r readraw 1 r readraw 1
......
...@@ -1223,11 +1223,20 @@ start_server {tags {"zset"}} { ...@@ -1223,11 +1223,20 @@ start_server {tags {"zset"}} {
} {} {needs:repl} } {} {needs:repl}
foreach resp {3 2} { 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" { test "ZPOPMIN/ZPOPMAX readraw in RESP$resp" {
r del zset{t} r del zset{t}
create_zset zset2{t} {1 a 2 b 3 c 4 d 5 e} create_zset zset2{t} {1 a 2 b 3 c 4 d 5 e}
r hello $resp
r readraw 1 r readraw 1
# ZPOP against non existing key. # ZPOP against non existing key.
...@@ -1260,9 +1269,6 @@ start_server {tags {"zset"}} { ...@@ -1260,9 +1269,6 @@ start_server {tags {"zset"}} {
r del zset{t} r del zset{t}
create_zset zset2{t} {1 a 2 b 3 c 4 d 5 e} 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 $rd readraw 1
# BZPOP released on timeout. # BZPOP released on timeout.
...@@ -1291,7 +1297,7 @@ start_server {tags {"zset"}} { ...@@ -1291,7 +1297,7 @@ start_server {tags {"zset"}} {
assert_equal [$rd read] {a} assert_equal [$rd read] {a}
verify_score_response $rd $resp 1 verify_score_response $rd $resp 1
$rd close $rd readraw 0
} }
test "ZMPOP readraw in RESP$resp" { test "ZMPOP readraw in RESP$resp" {
...@@ -1299,7 +1305,6 @@ start_server {tags {"zset"}} { ...@@ -1299,7 +1305,6 @@ start_server {tags {"zset"}} {
create_zset zset3{t} {1 a} create_zset zset3{t} {1 a}
create_zset zset4{t} {1 a 2 b 3 c 4 d 5 e} create_zset zset4{t} {1 a 2 b 3 c 4 d 5 e}
r hello $resp
r readraw 1 r readraw 1
# ZMPOP against non existing key. # ZMPOP against non existing key.
...@@ -1339,9 +1344,6 @@ start_server {tags {"zset"}} { ...@@ -1339,9 +1344,6 @@ start_server {tags {"zset"}} {
r del zset{t} zset2{t} r del zset{t} zset2{t}
create_zset zset3{t} {1 a 2 b 3 c 4 d 5 e} 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 $rd readraw 1
# BZMPOP released on timeout. # BZMPOP released on timeout.
...@@ -1380,8 +1382,9 @@ start_server {tags {"zset"}} { ...@@ -1380,8 +1382,9 @@ start_server {tags {"zset"}} {
assert_equal [$rd read] {b} assert_equal [$rd read] {b}
verify_score_response $rd $resp 2 verify_score_response $rd $resp 2
$rd close
} }
$rd close
} }
test {ZINTERSTORE regression with two sets, intset+hashtable} { test {ZINTERSTORE regression with two sets, intset+hashtable} {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment