This is an automated email from the ASF dual-hosted git repository.
rpuch 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 51cb224311 IGNITE-24128 Remove casts to RestartProofIgnite (#4983)
51cb224311 is described below
commit 51cb224311164a86483fd8d88b163cdac49cceda
Author: Roman Puchkovskiy <[email protected]>
AuthorDate: Fri Dec 27 16:58:46 2024 +0400
IGNITE-24128 Remove casts to RestartProofIgnite (#4983)
---
.../java/org/apache/ignite/jdbc/ItJdbcBatchSelfTest.java | 6 +++---
.../placementdriver/PlacementDriverNodesOperabilityTest.java | 8 +++-----
.../internal/disaster/ItDisasterRecoverySystemViewTest.java | 3 +--
3 files changed, 7 insertions(+), 10 deletions(-)
diff --git
a/modules/jdbc/src/integrationTest/java/org/apache/ignite/jdbc/ItJdbcBatchSelfTest.java
b/modules/jdbc/src/integrationTest/java/org/apache/ignite/jdbc/ItJdbcBatchSelfTest.java
index db6f6bc930..603a73c69a 100644
---
a/modules/jdbc/src/integrationTest/java/org/apache/ignite/jdbc/ItJdbcBatchSelfTest.java
+++
b/modules/jdbc/src/integrationTest/java/org/apache/ignite/jdbc/ItJdbcBatchSelfTest.java
@@ -45,12 +45,12 @@ import java.util.List;
import java.util.UUID;
import java.util.concurrent.ThreadLocalRandom;
import java.util.stream.Collectors;
+import org.apache.ignite.internal.TestWrappers;
import org.apache.ignite.internal.app.IgniteImpl;
import org.apache.ignite.internal.jdbc.JdbcPreparedStatement;
import org.apache.ignite.internal.jdbc.JdbcStatement;
import org.apache.ignite.internal.jdbc.proto.IgniteQueryErrorCode;
import org.apache.ignite.internal.jdbc.proto.SqlStateCode;
-import org.apache.ignite.internal.restart.RestartProofIgnite;
import org.apache.ignite.internal.sql.engine.QueryCancelledException;
import org.apache.ignite.internal.sql.engine.SqlQueryProcessor;
import org.apache.ignite.internal.sql.engine.exec.fsm.QueryInfo;
@@ -122,8 +122,8 @@ public class ItJdbcBatchSelfTest extends
AbstractJdbcSelfTest {
assertTrue(pstmt.isClosed());
long countOfPendingTransactions = CLUSTER.runningNodes()
- .map(RestartProofIgnite.class::cast)
- .map(rpi -> rpi.unwrap(IgniteImpl.class).txManager())
+ .map(TestWrappers::unwrapIgniteImpl)
+ .map(IgniteImpl::txManager)
.collect(Collectors.summarizingInt(TxManager::pending))
.getSum();
diff --git
a/modules/placement-driver/src/integrationTest/java/org/apache/ignite/internal/placementdriver/PlacementDriverNodesOperabilityTest.java
b/modules/placement-driver/src/integrationTest/java/org/apache/ignite/internal/placementdriver/PlacementDriverNodesOperabilityTest.java
index 452fabe968..568165bedc 100644
---
a/modules/placement-driver/src/integrationTest/java/org/apache/ignite/internal/placementdriver/PlacementDriverNodesOperabilityTest.java
+++
b/modules/placement-driver/src/integrationTest/java/org/apache/ignite/internal/placementdriver/PlacementDriverNodesOperabilityTest.java
@@ -18,6 +18,7 @@
package org.apache.ignite.internal.placementdriver;
import static java.util.stream.Collectors.toSet;
+import static org.apache.ignite.internal.TestWrappers.unwrapIgniteImpl;
import static org.apache.ignite.internal.TestWrappers.unwrapTableImpl;
import static
org.apache.ignite.internal.testframework.IgniteTestUtils.waitForCondition;
import static org.junit.jupiter.api.Assertions.assertTrue;
@@ -34,7 +35,6 @@ import org.apache.ignite.internal.lang.IgniteBiTuple;
import org.apache.ignite.internal.partitiondistribution.TokenizedAssignments;
import org.apache.ignite.internal.replicator.ReplicationGroupId;
import org.apache.ignite.internal.replicator.TablePartitionId;
-import org.apache.ignite.internal.restart.RestartProofIgnite;
import org.apache.ignite.internal.table.TableImpl;
import org.junit.jupiter.api.Test;
@@ -57,11 +57,9 @@ public class PlacementDriverNodesOperabilityTest extends
ClusterPerClassIntegrat
Set<Integer> cmgMetastoreNodesIndices =
Arrays.stream(cmgMetastoreNodes()).boxed().collect(toSet());
- RestartProofIgnite igniteMs = (RestartProofIgnite) findAliveNode(ni ->
cmgMetastoreNodesIndices.contains(ni.getKey()));
- IgniteImpl metaStorageNode = igniteMs.unwrap(IgniteImpl.class);
+ IgniteImpl metaStorageNode = unwrapIgniteImpl(findAliveNode(ni ->
cmgMetastoreNodesIndices.contains(ni.getKey())));
- RestartProofIgnite igniteNms = (RestartProofIgnite) findAliveNode(ni
-> !cmgMetastoreNodesIndices.contains(ni.getKey()));
- IgniteImpl nonMetaStorageNode = igniteNms.unwrap(IgniteImpl.class);
+ IgniteImpl nonMetaStorageNode = unwrapIgniteImpl(findAliveNode(ni ->
!cmgMetastoreNodesIndices.contains(ni.getKey())));
TableImpl table =
unwrapTableImpl(metaStorageNode.tables().table("TABLE_TEST"));
ReplicationGroupId groupId = new TablePartitionId(table.tableId(), 0);
diff --git
a/modules/table/src/integrationTest/java/org/apache/ignite/internal/disaster/ItDisasterRecoverySystemViewTest.java
b/modules/table/src/integrationTest/java/org/apache/ignite/internal/disaster/ItDisasterRecoverySystemViewTest.java
index 07f4fd2fd6..4d1c270230 100644
---
a/modules/table/src/integrationTest/java/org/apache/ignite/internal/disaster/ItDisasterRecoverySystemViewTest.java
+++
b/modules/table/src/integrationTest/java/org/apache/ignite/internal/disaster/ItDisasterRecoverySystemViewTest.java
@@ -38,7 +38,6 @@ import org.apache.ignite.internal.app.IgniteImpl;
import org.apache.ignite.internal.catalog.CatalogManager;
import org.apache.ignite.internal.raft.service.RaftGroupService;
import org.apache.ignite.internal.replicator.TablePartitionId;
-import org.apache.ignite.internal.restart.RestartProofIgnite;
import org.apache.ignite.internal.sql.BaseSqlIntegrationTest;
import org.apache.ignite.internal.storage.MvPartitionStorage;
import org.apache.ignite.internal.table.TableImpl;
@@ -159,7 +158,7 @@ public class ItDisasterRecoverySystemViewTest extends
BaseSqlIntegrationTest {
* @param partitionsCount Expected the table partitions count for
iterating over them.
*/
private static void waitLeaderOnAllPartitions(String tableName, int
partitionsCount) {
- IgniteImpl node = ((RestartProofIgnite)
CLUSTER.node(0)).unwrap(IgniteImpl.class);
+ IgniteImpl node = unwrapIgniteImpl(CLUSTER.node(0));
TableImpl table = ((PublicApiThreadingTable)
node.tables().table(tableName)).unwrap(TableImpl.class);