diff --git a/tests/integration/failover.tcl b/tests/integration/failover.tcl index c2df86c67..0f2d3e5a7 100644 --- a/tests/integration/failover.tcl +++ b/tests/integration/failover.tcl @@ -180,19 +180,16 @@ start_server {overrides {save {}}} { assert_equal [count_log_message -2 "time out exceeded, failing over."] 1 - # We should accept both psyncs, although this is the condition we might - # not meet since we didn't catch up. This happens often if TSan is - # enabled as it slows down the execution time significantly. + # We should accept both psyncs and full syncs, although this is the condition we might + # not meet since we didn't catch up. This happens often in slow environments + # (TSAN, IO threads, etc) which can force a full resync instead of a partial + # one. Count both partial and full syncs and verify the total increments by two. set psyncs [expr [s 0 sync_partial_ok] - $initial_psyncs] set full_syncs [expr [s 0 sync_full] - $initial_syncs] - if {$::tsan} { - assert_lessthan_equal $psyncs 2 - assert_morethan_equal $full_syncs 0 - assert_equal [expr $psyncs + $full_syncs] 2 - } else { - assert_equal $psyncs 2 - assert_equal $full_syncs 0 - } + # Either we get 2 partial syncs, or some combination of partial/full that totals 2 + assert_lessthan_equal $psyncs 2 + assert_morethan_equal $full_syncs 0 + assert_equal [expr $psyncs + $full_syncs] 2 assert_digests_match $node_0 $node_1 $node_2 }