From 23b2f5b09976fe3ee2f2dd1180279ad1fcdfa258 Mon Sep 17 00:00:00 2001 From: Kirill Sizov Date: Fri, 6 Mar 2026 10:58:39 +0300 Subject: [PATCH] IGNITE-28086 Fix flaky test testHaWhenAllVotingMembersAreLost The issue was that there was a race at node stop. Solution was to set the timeouts so that nodes go out at the same time, not one by one --- ...ItHighAvailablePartitionsRecoveryByFilterUpdateTest.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/modules/table/src/integrationTest/java/org/apache/ignite/internal/table/distributed/disaster/ItHighAvailablePartitionsRecoveryByFilterUpdateTest.java b/modules/table/src/integrationTest/java/org/apache/ignite/internal/table/distributed/disaster/ItHighAvailablePartitionsRecoveryByFilterUpdateTest.java index 37285d0049a9..aaac93099f2b 100644 --- a/modules/table/src/integrationTest/java/org/apache/ignite/internal/table/distributed/disaster/ItHighAvailablePartitionsRecoveryByFilterUpdateTest.java +++ b/modules/table/src/integrationTest/java/org/apache/ignite/internal/table/distributed/disaster/ItHighAvailablePartitionsRecoveryByFilterUpdateTest.java @@ -506,6 +506,9 @@ void testHaWhenAllVotingMembersAreLost() throws Exception { assertEquals(3, followers.size()); + // Set a high timeout to prevent multiple recovery events from firing when followers leave topology one by one. + changePartitionDistributionTimeout(node0, (int) TimeUnit.MINUTES.toSeconds(5)); + // Stop all followers. followers.forEach(n -> stopNode(n.consistentId())); @@ -516,6 +519,9 @@ void testHaWhenAllVotingMembersAreLost() throws Exception { IgniteImpl node = igniteImpl(nodeIndex(learners.iterator().next())); + // Trigger a single recovery event by setting timeout to 0. + changePartitionDistributionTimeout(node0, 0); + // Wait for the partition to become available on the learners. waitAndAssertStableAssignmentsOfPartitionEqualTo(node, HA_TABLE_NAME, Set.of(0), learners); }