diff options
author | antirez <antirez@gmail.com> | 2010-07-28 14:08:46 +0200 |
---|---|---|
committer | antirez <antirez@gmail.com> | 2010-07-28 14:08:46 +0200 |
commit | a0573260b0928170d66268eb22be1a5699615275 (patch) | |
tree | 35229475e448f9203d8680a0ffa77fef4662ae3a /tests/integration/replication.tcl | |
parent | 6171250871e408928a172c09d5fdf41961720fbc (diff) | |
download | redis-a0573260b0928170d66268eb22be1a5699615275.tar.gz |
better random dataset creation function in test. master-slave replication test now is able to save the two datasets in CSV when an inconsistency is detected.
Diffstat (limited to 'tests/integration/replication.tcl')
-rw-r--r-- | tests/integration/replication.tcl | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/integration/replication.tcl b/tests/integration/replication.tcl index 39d77c8f9..4b2588251 100644 --- a/tests/integration/replication.tcl +++ b/tests/integration/replication.tcl @@ -8,6 +8,19 @@ start_server {tags {"repl"}} { test {MASTER and SLAVE dataset should be identical after complex ops} { createComplexDataset r 10000 + after 500 + if {[r debug digest] ne [r -1 debug digest]} { + set csv1 [csvdump r] + set csv2 [csvdump {r -1}] + set fd [open /tmp/repldump1.txt w] + puts -nonewline $fd $csv1 + close $fd + set fd [open /tmp/repldump2.txt w] + puts -nonewline $fd $csv2 + close $fd + puts "Master - Slave inconsistency" + puts "Run diff -u against /tmp/repldump*.txt for more info" + } assert_equal [r debug digest] [r -1 debug digest] } } |