X-Git-Url: https://git.saurik.com/redis.git/blobdiff_plain/36741b2c818a95e8ef167818271614ee6b1bc414..5513397de7526f0e5e01c1d29a37813008703d6d:/tests/unit/scripting.tcl?ds=inline diff --git a/tests/unit/scripting.tcl b/tests/unit/scripting.tcl index 05791871..f96d0fc6 100644 --- a/tests/unit/scripting.tcl +++ b/tests/unit/scripting.tcl @@ -301,7 +301,7 @@ start_server {tags {"scripting"}} { catch {r ping} e assert_match {BUSY*} $e catch {r script kill} e - assert_match {ERR*} $e + assert_match {UNKILLABLE*} $e catch {r ping} e assert_match {BUSY*} $e } @@ -344,5 +344,22 @@ start_server {tags {"scripting repl"}} { fail "Expected 2 in x, but value is '[r -1 get x]'" } } + + test {Replication of script multiple pushes to list with BLPOP} { + set rd [redis_deferring_client] + $rd brpop a 0 + r eval { + redis.call("lpush","a","1"); + redis.call("lpush","a","2"); + } 0 + set res [$rd read] + $rd close + wait_for_condition 50 100 { + [r -1 lrange a 0 -1] eq [r lrange a 0 -1] + } else { + fail "Expected list 'a' in slave and master to be the same, but they are respectively '[r -1 lrange a 0 -1]' and '[r lrange a 0 -1]'" + } + set res + } {a 1} } }