summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests/integration/replication.tcl21
1 files changed, 17 insertions, 4 deletions
diff --git a/tests/integration/replication.tcl b/tests/integration/replication.tcl
index bb06e18ac..435e8fcde 100644
--- a/tests/integration/replication.tcl
+++ b/tests/integration/replication.tcl
@@ -569,6 +569,15 @@ foreach testType {Successful Aborted} {
redis.register_function('test', function() return 'hello2' end)
}
+ # Remember the sync_full stat before the client kill.
+ set sync_full [s 0 sync_full]
+
+ if {$testType == "Aborted"} {
+ # Set master with a slow rdb generation, so that we can easily intercept loading
+ # 10ms per key, with 2000 keys is 20 seconds
+ $master config set rdb-key-save-delay 10000
+ }
+
# Force the replica to try another full sync (this time it will have matching master replid)
$master multi
$master client kill type replica
@@ -579,12 +588,16 @@ foreach testType {Successful Aborted} {
}
$master exec
+ # Wait for sync_full to get incremented from the previous value.
+ # After the client kill, make sure we do a reconnect, and do a FULL SYNC.
+ wait_for_condition 100 100 {
+ [s 0 sync_full] > $sync_full
+ } else {
+ fail "Master <-> Replica didn't start the full sync"
+ }
+
switch $testType {
"Aborted" {
- # Set master with a slow rdb generation, so that we can easily intercept loading
- # 10ms per key, with 2000 keys is 20 seconds
- $master config set rdb-key-save-delay 10000
-
test {Diskless load swapdb (async_loading): replica enter async_loading} {
# Wait for the replica to start reading the rdb
wait_for_condition 100 100 {