From 9b2b3524431c2b6501341c577c4c977d98b0d010 Mon Sep 17 00:00:00 2001 From: naglera Date: Sun, 2 Jun 2024 08:38:42 +0000 Subject: [PATCH] Deflake total sum of full synchronizations Deflake test "PSYNC2: total sum of full synchronizations at least 4" Explaination: during the prior test "PSYNC2: generate load while killing replication links" load is generated on the master, and the replica's connection is killed multiple times. On busy machine this load can force the replica to full sync. There is no guarantee that the replicas will find the necessary bytes in the COB. Signed-off-by: naglera --- tests/integration/psync2.tcl | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/integration/psync2.tcl b/tests/integration/psync2.tcl index 69d536601c..13f4347c11 100644 --- a/tests/integration/psync2.tcl +++ b/tests/integration/psync2.tcl @@ -290,14 +290,17 @@ start_server {} { show_cluster_status } - test "PSYNC2: total sum of full synchronizations is exactly 4" { + test "PSYNC2: total sum of full synchronizations at least 4" { + # During the setup, four full syncs were performed. It is also possible that one + # of the disconnected replicas may be forced to full sync during the + # 'generate load while killing replication links' test. set sum 0 for {set j 0} {$j < 5} {incr j} { incr sum [status $R($j) sync_full] } if {$sum != 4} { show_cluster_status - assert {$sum == 4} + assert {$sum >= 4} } }