Skip to content

Commit 00bfdef

Browse files
enjoy-binbinhpatro
authored andcommitted
Add packet-drop to fix the new flaky failover test (valkey-io#2196)
The new test was added in valkey-io#2178, obviously there may be pending reads in the connection, so there may be a race in the DROP-CLUSTER-PACKET-FILTER part causing the test to fail. Add CLOSE-CLUSTER-LINK-ON-PACKET-DROP to ensure that the replica does not process the packet. Signed-off-by: Binbin <[email protected]>
1 parent 3bda2ee commit 00bfdef

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

tests/unit/cluster/failover2.tcl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,7 @@ proc test_replica_config_epoch_failover {type} {
147147
R 3 CONFIG SET cluster-replica-no-failover yes
148148
}
149149
R 3 DEBUG DROP-CLUSTER-PACKET-FILTER $CLUSTER_PACKET_TYPE_ALL
150+
R 3 DEBUG CLOSE-CLUSTER-LINK-ON-PACKET-DROP 1
150151

151152
set R0_nodeid [R 0 cluster myid]
152153

@@ -169,6 +170,7 @@ proc test_replica_config_epoch_failover {type} {
169170
# Pause the R 0 and wait for the cluster to be down.
170171
pause_process [srv 0 pid]
171172
R 3 DEBUG DROP-CLUSTER-PACKET-FILTER $CLUSTER_PACKET_TYPE_NONE
173+
R 3 DEBUG CLOSE-CLUSTER-LINK-ON-PACKET-DROP 0
172174
wait_for_condition 1000 50 {
173175
[CI 1 cluster_state] == "fail" &&
174176
[CI 2 cluster_state] == "fail" &&

0 commit comments

Comments
 (0)