1 start_server
{tags
{"repl"}} {
3 test
{First server should have role slave
after SLAVEOF
} {
4 r
-1 slaveof
[srv
0 host
] [srv
0 port
]
9 if {$::accurate} {set numops
50000} else {set numops
5000}
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
]} {
18 set csv2
[csvdump
{r
-1}]
19 set fd
[open /tmp
/repldump1.txt w
]
20 puts -nonewline $fd $csv1
22 set fd
[open /tmp
/repldump2.txt w
]
23 puts -nonewline $fd $csv2
25 puts "Master - Slave inconsistency"
26 puts "Run diff -u against /tmp/repldump*.txt for more info"
28 assert_equal
[r debug digest
] [r
-1 debug digest
]