summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorantirez <antirez@gmail.com>2020-05-27 12:50:02 +0200
committerantirez <antirez@gmail.com>2020-05-27 12:50:02 +0200
commit484cfc3d7603277e8c5761dd571962dd0201d873 (patch)
tree8bb0cd0947f995cfead3582c5339844a8b86864f /tests
parent32d0df0c1fb5fdd39defc6d85887cca73d062f47 (diff)
downloadredis-484cfc3d7603277e8c5761dd571962dd0201d873.tar.gz
Another meaningful offset test removed.
Diffstat (limited to 'tests')
-rw-r--r--tests/integration/psync2.tcl100
1 files changed, 0 insertions, 100 deletions
diff --git a/tests/integration/psync2.tcl b/tests/integration/psync2.tcl
index 29a880f99..7c50f620e 100644
--- a/tests/integration/psync2.tcl
+++ b/tests/integration/psync2.tcl
@@ -370,103 +370,3 @@ start_server {} {
}
}}}}}
-
-start_server {tags {"psync2"}} {
-start_server {} {
-start_server {} {
-start_server {} {
-start_server {} {
- test {pings at the end of replication stream are ignored for psync} {
- set master [srv -4 client]
- set master_host [srv -4 host]
- set master_port [srv -4 port]
- set replica1 [srv -3 client]
- set replica2 [srv -2 client]
- set replica3 [srv -1 client]
- set replica4 [srv -0 client]
-
- $replica1 replicaof $master_host $master_port
- $replica2 replicaof $master_host $master_port
- $replica3 replicaof $master_host $master_port
- $replica4 replicaof $master_host $master_port
- wait_for_condition 50 1000 {
- [status $master connected_slaves] == 4
- } else {
- fail "replicas didn't connect"
- }
-
- $master incr x
- wait_for_condition 50 1000 {
- [$replica1 get x] == 1 && [$replica2 get x] == 1 &&
- [$replica3 get x] == 1 && [$replica4 get x] == 1
- } else {
- fail "replicas didn't get incr"
- }
-
- # disconnect replica1 and replica2
- # and wait for the master to send a ping to replica3 and replica4
- $replica1 replicaof no one
- $replica2 replicaof 127.0.0.1 1 ;# we can't promote it to master since that will cycle the replication id
- $master config set repl-ping-replica-period 1
- after 1500
-
- # make everyone sync from the replica1 that didn't get the last ping from the old master
- # replica4 will keep syncing from the old master which now syncs from replica1
- # and replica2 will re-connect to the old master (which went back in time)
- set new_master_host [srv -3 host]
- set new_master_port [srv -3 port]
- $replica3 replicaof $new_master_host $new_master_port
- $master replicaof $new_master_host $new_master_port
- $replica2 replicaof $master_host $master_port
- wait_for_condition 50 1000 {
- [status $replica2 master_link_status] == "up" &&
- [status $replica3 master_link_status] == "up" &&
- [status $replica4 master_link_status] == "up" &&
- [status $master master_link_status] == "up"
- } else {
- fail "replicas didn't connect"
- }
-
- # make sure replication is still alive and kicking
- $replica1 incr x
- wait_for_condition 50 1000 {
- [$replica2 get x] == 2 &&
- [$replica3 get x] == 2 &&
- [$replica4 get x] == 2 &&
- [$master get x] == 2
- } else {
- fail "replicas didn't get incr"
- }
-
- # make sure there are full syncs other than the initial ones
- assert_equal [status $master sync_full] 4
- assert_equal [status $replica1 sync_full] 0
- assert_equal [status $replica2 sync_full] 0
- assert_equal [status $replica3 sync_full] 0
- assert_equal [status $replica4 sync_full] 0
-
- # force psync
- $master client kill type master
- $replica2 client kill type master
- $replica3 client kill type master
- $replica4 client kill type master
-
- # make sure replication is still alive and kicking
- $replica1 incr x
- wait_for_condition 50 1000 {
- [$replica2 get x] == 3 &&
- [$replica3 get x] == 3 &&
- [$replica4 get x] == 3 &&
- [$master get x] == 3
- } else {
- fail "replicas didn't get incr"
- }
-
- # make sure there are full syncs other than the initial ones
- assert_equal [status $master sync_full] 4
- assert_equal [status $replica1 sync_full] 0
- assert_equal [status $replica2 sync_full] 0
- assert_equal [status $replica3 sync_full] 0
- assert_equal [status $replica4 sync_full] 0
-}
-}}}}}