diff options
author | antirez <antirez@gmail.com> | 2013-05-08 11:58:26 +0200 |
---|---|---|
committer | antirez <antirez@gmail.com> | 2013-05-08 11:58:26 +0200 |
commit | c87dd0fe494fc258f941c43c6843c4ed11b95c00 (patch) | |
tree | 9f77c1cff2bc8bbdd3d7ac366acacfbe70d7bd4b /tests/integration/replication-4.tcl | |
parent | 0ae1b5b0a197154167a895f1188f1822a78732e4 (diff) | |
download | redis-c87dd0fe494fc258f941c43c6843c4ed11b95c00.tar.gz |
Test: various issues with the replication-4.tcl test fixed.
The test actually worked, but vars for master and slave were inverted
and sometimes used incorrectly.
Diffstat (limited to 'tests/integration/replication-4.tcl')
-rw-r--r-- | tests/integration/replication-4.tcl | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/tests/integration/replication-4.tcl b/tests/integration/replication-4.tcl index 0a0dcdc2b..29ab48fc2 100644 --- a/tests/integration/replication-4.tcl +++ b/tests/integration/replication-4.tcl @@ -10,21 +10,22 @@ proc stop_bg_complex_data {handle} { start_server {tags {"repl"}} { start_server {} { - set master [srv 0 client] - set master_host [srv 0 host] - set master_port [srv 0 port] + set master [srv -1 client] + set master_host [srv -1 host] + set master_port [srv -1 port] + set slave [srv 0 client] + set load_handle0 [start_bg_complex_data $master_host $master_port 9 100000] set load_handle1 [start_bg_complex_data $master_host $master_port 11 100000] set load_handle2 [start_bg_complex_data $master_host $master_port 12 100000] test {First server should have role slave after SLAVEOF} { - r -1 slaveof [srv 0 host] [srv 0 port] + $slave slaveof $master_host $master_port after 1000 - s -1 role + s 0 role } {slave} test {Test replication with parallel clients writing in differnet DBs} { - lappend slave [srv 0 client] after 5000 stop_bg_complex_data $load_handle0 stop_bg_complex_data $load_handle1 @@ -37,7 +38,7 @@ start_server {tags {"repl"}} { } assert {[$master dbsize] > 0} - if {[r debug digest] ne [r -1 debug digest]} { + if {[$master debug digest] ne [$slave debug digest]} { set csv1 [csvdump r] set csv2 [csvdump {r -1}] set fd [open /tmp/repldump1.txt w] |