]> git.saurik.com Git - redis.git/blame_incremental - tests/integration/replication-3.tcl
popcount() optimization for speed.
[redis.git] / tests / integration / replication-3.tcl
... / ...
CommitLineData
1start_server {tags {"repl"}} {
2 start_server {} {
3 test {First server should have role slave after SLAVEOF} {
4 r -1 slaveof [srv 0 host] [srv 0 port]
5 after 1000
6 s -1 role
7 } {slave}
8
9 if {$::accurate} {set numops 50000} else {set numops 5000}
10
11 test {MASTER and SLAVE consistency with expire} {
12 createComplexDataset r $numops useexpire
13 after 4000 ;# Make sure everything expired before taking the digest
14 r keys * ;# Force DEL syntesizing to slave
15 after 1000 ;# Wait another second. Now everything should be fine.
16 if {[r debug digest] ne [r -1 debug digest]} {
17 set csv1 [csvdump r]
18 set csv2 [csvdump {r -1}]
19 set fd [open /tmp/repldump1.txt w]
20 puts -nonewline $fd $csv1
21 close $fd
22 set fd [open /tmp/repldump2.txt w]
23 puts -nonewline $fd $csv2
24 close $fd
25 puts "Master - Slave inconsistency"
26 puts "Run diff -u against /tmp/repldump*.txt for more info"
27 }
28 assert_equal [r debug digest] [r -1 debug digest]
29 }
30 }
31}