summaryrefslogtreecommitdiff
path: root/tests/unit/scripting.tcl
diff options
context:
space:
mode:
authorYossi Gottlieb <yossigo@gmail.com>2013-06-23 08:59:01 +0300
committerYossi Gottlieb <yossigo@gmail.com>2013-06-23 08:59:01 +0300
commita9a29ff16effa0d36a16c0859c3dadb4ab87889a (patch)
tree89e376da1560d6fb16b20d1b570d9a53017458be /tests/unit/scripting.tcl
parent9cc3257e94cdbea94ea259f834409a221f121da4 (diff)
parent16ddbb7dfc435f1abb01ecd4df316827be341899 (diff)
downloadredis-a9a29ff16effa0d36a16c0859c3dadb4ab87889a.tar.gz
Merge upstream 2.6.14.2.6.14-1
Diffstat (limited to 'tests/unit/scripting.tcl')
-rw-r--r--tests/unit/scripting.tcl17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/unit/scripting.tcl b/tests/unit/scripting.tcl
index 64cf00d55..bbb6b5fd1 100644
--- a/tests/unit/scripting.tcl
+++ b/tests/unit/scripting.tcl
@@ -281,6 +281,23 @@ start_server {tags {"scripting"}} {
assert_equal $rand1 $rand2
assert {$rand2 ne $rand3}
}
+
+ test {EVAL processes writes from AOF in read-only slaves} {
+ r flushall
+ r config set appendonly yes
+ r eval {redis.call("set","foo","100")} 0
+ r eval {redis.call("incr","foo")} 0
+ r eval {redis.call("incr","foo")} 0
+ wait_for_condition 50 100 {
+ [s aof_rewrite_in_progress] == 0
+ } else {
+ fail "AOF rewrite can't complete after CONFIG SET appendonly yes."
+ }
+ r config set slave-read-only yes
+ r slaveof 127.0.0.1 0
+ r debug loadaof
+ r get foo
+ } {102}
}
# Start a new server since the last test in this stanza will kill the