X-Git-Url: https://git.saurik.com/redis.git/blobdiff_plain/57356b80cddd203086e932a09a8916a925cb8cf6..46c31a150a0e6a67eaaf4b1e1146ec815cc1355e:/tests/unit/scripting.tcl?ds=sidebyside diff --git a/tests/unit/scripting.tcl b/tests/unit/scripting.tcl index daf0c0f2..6d60e419 100644 --- a/tests/unit/scripting.tcl +++ b/tests/unit/scripting.tcl @@ -145,6 +145,12 @@ start_server {tags {"scripting"}} { set e } {*not allowed after*} + test {EVAL - No arguments to redis.call/pcall is considered an error} { + set e {} + catch {r eval {return redis.call()} 0} e + set e + } {*one argument*} + test {EVAL - redis.call variant raises a Lua error on Redis cmd error (1)} { set e {} catch { @@ -319,9 +325,13 @@ start_server {tags {"scripting repl"}} { test {Connect a slave to the main instance} { r -1 slaveof [srv 0 host] [srv 0 port] - after 1000 - s -1 role - } {slave} + wait_for_condition 50 100 { + [s -1 role] eq {slave} && + [string match {*master_link_status:up*} [r -1 info replication]] + } else { + fail "Can't turn the instance into a slave" + } + } test {Now use EVALSHA against the master} { r evalsha ae3477e27be955de7e1bc9adfdca626b478d3cb2 0