This is an automated email from the ASF dual-hosted git repository.

sanpwc pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/ignite-3.git


The following commit(s) were added to refs/heads/main by this push:
     new 8d59f56e74b IGNITE-26920 Fix 
ItTxResourcesVacuumTest.testAbandonedTxnsAreNotVacuumizedUntilRecovered (#6895)
8d59f56e74b is described below

commit 8d59f56e74b30ea2c7c41f001ec1ed79a6f78445
Author: Alexander Lapin <[email protected]>
AuthorDate: Thu Nov 6 11:19:39 2025 +0200

    IGNITE-26920 Fix 
ItTxResourcesVacuumTest.testAbandonedTxnsAreNotVacuumizedUntilRecovered (#6895)
---
 .../ignite/tx/distributed/ItTxResourcesVacuumTest.java    | 15 ++++++++++++---
 1 file changed, 12 insertions(+), 3 deletions(-)

diff --git 
a/modules/transactions/src/integrationTest/java/org/apache/ignite/tx/distributed/ItTxResourcesVacuumTest.java
 
b/modules/transactions/src/integrationTest/java/org/apache/ignite/tx/distributed/ItTxResourcesVacuumTest.java
index 8c0d2ec28c7..951bf7b7f99 100644
--- 
a/modules/transactions/src/integrationTest/java/org/apache/ignite/tx/distributed/ItTxResourcesVacuumTest.java
+++ 
b/modules/transactions/src/integrationTest/java/org/apache/ignite/tx/distributed/ItTxResourcesVacuumTest.java
@@ -124,6 +124,11 @@ public class ItTxResourcesVacuumTest extends 
ClusterPerTestIntegrationTest {
             IgniteThreadFactory.create("test", 
"tx-state-storage-test-pool-itrvt", log, ThreadOperation.STORAGE_READ)
     );
 
+    @Override
+    protected int[] cmgMetastoreNodes() {
+        return new int[]{0, 1, 2};
+    }
+
     @BeforeEach
     public void setup() {
         String zoneSql = "create zone test_zone (partitions 20, replicas " + 
REPLICAS
@@ -296,9 +301,7 @@ public class ItTxResourcesVacuumTest extends 
ClusterPerTestIntegrationTest {
     public void testAbandonedTxnsAreNotVacuumizedUntilRecovered() throws 
InterruptedException {
         setTxResourceTtl(1);
 
-        IgniteImpl leaseholder = unwrapIgniteImpl(cluster.node(0));
-
-        Tuple tuple = findTupleToBeHostedOnNode(leaseholder, TABLE_NAME, null, 
INITIAL_TUPLE, NEXT_TUPLE, true);
+        Tuple tuple = INITIAL_TUPLE;
 
         int partId = partitionIdForTuple(anyNode(), TABLE_NAME, tuple, null);
 
@@ -306,6 +309,12 @@ public class ItTxResourcesVacuumTest extends 
ClusterPerTestIntegrationTest {
                 ? new ZonePartitionId(zoneId(anyNode(), TABLE_NAME), partId)
                 : new TablePartitionId(tableId(anyNode(), TABLE_NAME), partId);
 
+        ReplicaMeta replicaMeta = waitAndGetPrimaryReplica(anyNode(), groupId);
+        assertNotNull(replicaMeta);
+        assertNotNull(replicaMeta.getLeaseholder());
+
+        IgniteImpl leaseholder = 
unwrapIgniteImpl(cluster.node(cluster.nodeIndex(replicaMeta.getLeaseholder())));
+
         Set<String> txNodes = partitionAssignment(anyNode(), groupId);
 
         IgniteImpl abandonedTxCoord = findNode(n -> 
!txNodes.contains(n.name()));

Reply via email to