Skip to content

Commit 128f30b

Browse files
Reduce flakiness of atomic slot migration AOF test (#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 <[email protected]> Signed-off-by: Viktor Söderqvist <[email protected]> Co-authored-by: Viktor Söderqvist <[email protected]>
1 parent 40a257d commit 128f30b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

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)