summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorantirez <antirez@gmail.com>2017-12-04 10:26:02 +0100
committerantirez <antirez@gmail.com>2017-12-04 10:26:02 +0100
commit6f0b19bc5b0f89d7d9d89e84de1f4c9a859df59c (patch)
tree74363015eb2117d1a8ff146430549662128072b3
parent6a1bf07a46ce7d8cb3d9443abedd05dfa2f8096a (diff)
downloadredis-6f0b19bc5b0f89d7d9d89e84de1f4c9a859df59c.tar.gz
Regression test for #4505 (Lua AUX field loading).
-rw-r--r--tests/integration/replication-3.tcl23
1 files changed, 22 insertions, 1 deletions
diff --git a/tests/integration/replication-3.tcl b/tests/integration/replication-3.tcl
index 50dcb9a9a..580be7602 100644
--- a/tests/integration/replication-3.tcl
+++ b/tests/integration/replication-3.tcl
@@ -100,7 +100,6 @@ start_server {tags {"repl"}} {
close $fd
puts "Master - Slave inconsistency"
puts "Run diff -u against /tmp/repldump*.txt for more info"
-
}
set old_digest [r debug digest]
@@ -109,5 +108,27 @@ start_server {tags {"repl"}} {
set new_digest [r debug digest]
assert {$old_digest eq $new_digest}
}
+
+ test {SLAVE can reload "lua" AUX RDB fields of duplicated scripts} {
+ # Force a Slave full resynchronization
+ r debug change-repl-id
+ r -1 client kill type master
+
+ # Check that after a full resync the slave can still load
+ # correctly the RDB file: such file will contain "lua" AUX
+ # sections with scripts already in the memory of the master.
+
+ wait_for_condition 50 100 {
+ [s -1 master_link_status] eq {up}
+ } else {
+ fail "Replication not started."
+ }
+
+ wait_for_condition 50 100 {
+ [r debug digest] eq [r -1 debug digest]
+ } else {
+ fail "DEBUG DIGEST mismatch after full SYNC with many scripts"
+ }
+ }
}
}