Skip to content

Commit 22247f6

Browse files
Reduce flakiness of atomic slot migration AOF test (valkey-io#2705)
If we don't wait for the replica to resync, the migration may be cancelled by the time the replica resyncs, resulting in a test failure when we can't find the migration on the replica. --------- Signed-off-by: Jacob Murphy <jkmurphy@google.com> Signed-off-by: Viktor Söderqvist <viktor.soderqvist@est.tech> Co-authored-by: Viktor Söderqvist <viktor.soderqvist@est.tech>
1 parent 3390b1e commit 22247f6

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

tests/unit/cluster/cluster-migrateslots.tcl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2174,8 +2174,9 @@ start_cluster 3 3 {tags {logreqres:skip external:skip cluster aofrw} overrides {
21742174
wait_for_migration_field 3 $jobname state occurring-on-primary
21752175
assert_match "0" [R 3 DBSIZE]
21762176

2177-
# Restart the replica
2177+
# Restart the replica and wait for resync
21782178
do_node_restart 3
2179+
wait_for_sync [srv -3 client] 50 1000
21792180

21802181
# Replica should still see the migration. Note that since AOF does not
21812182
# persist the replication ID, this is because of a full resync.

0 commit comments

Comments
 (0)