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

apolovtsev 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 0a30ae72d4 IGNITE-23491 Fix various issues with the Cluster class 
(#4595)
0a30ae72d4 is described below

commit 0a30ae72d46d07cab95b608d4559b5695da59e98
Author: Alexander Polovtcev <[email protected]>
AuthorDate: Fri Oct 18 17:07:02 2024 +0300

    IGNITE-23491 Fix various issues with the Cluster class (#4595)
    
    * Nullify the list of nodes after calling `Cluster#shutdown`
    * Use thread safe collections where necessary
    * Cleanup usages of starting and stopping a cluster
---
 ...liCommandTestNotInitializedIntegrationBase.java |  2 +-
 .../ItPrimaryReplicaChoiceTest.java                |  6 +-
 .../rest/authentication/ItAuthenticationTest.java  | 14 ++---
 .../org/apache/ignite/internal/ItClusterTest.java  | 66 ++++++++++++++++++++++
 .../runner/app/ItIgniteStopLogMessagesTest.java    |  6 +-
 .../java/org/apache/ignite/internal/Cluster.java   | 43 +++++++-------
 .../internal/ClusterPerClassIntegrationTest.java   |  6 +-
 .../internal/ClusterPerTestIntegrationTest.java    |  4 +-
 .../sql/engine/ItIndexesSystemViewTest.java        |  6 +-
 .../internal/sql/engine/ItSystemViewsTest.java     |  6 +-
 .../internal/sql/engine/ItZonesSystemViewTest.java |  6 +-
 .../disaster/ItDisasterRecoverySystemViewTest.java |  6 +-
 .../ignite/internal/table/ItCriteriaQueryTest.java |  6 +-
 .../internal/table/ItOperationRetryTest.java       |  6 +-
 .../table/ItTransactionPrimaryChangeTest.java      |  6 +-
 .../internal/table/ItTransactionRecoveryTest.java  |  6 +-
 .../internal/table/ItTxResourcesVacuumTest.java    |  9 +--
 17 files changed, 114 insertions(+), 90 deletions(-)

diff --git 
a/modules/cli/src/integrationTest/java/org/apache/ignite/internal/cli/commands/CliCommandTestNotInitializedIntegrationBase.java
 
b/modules/cli/src/integrationTest/java/org/apache/ignite/internal/cli/commands/CliCommandTestNotInitializedIntegrationBase.java
index 240a040d3a..4c4242ede2 100644
--- 
a/modules/cli/src/integrationTest/java/org/apache/ignite/internal/cli/commands/CliCommandTestNotInitializedIntegrationBase.java
+++ 
b/modules/cli/src/integrationTest/java/org/apache/ignite/internal/cli/commands/CliCommandTestNotInitializedIntegrationBase.java
@@ -36,7 +36,7 @@ public class CliCommandTestNotInitializedIntegrationBase 
extends CliIntegrationT
 
     @BeforeAll
     @Override
-    protected void beforeAll(TestInfo testInfo) {
+    protected void startCluster(TestInfo testInfo) {
         CLUSTER = new Cluster(testInfo, WORK_DIR, 
getNodeBootstrapConfigTemplate());
 
         for (int i = 0; i < initialNodes(); i++) {
diff --git 
a/modules/placement-driver/src/integrationTest/java/org/apache/ignite/internal/placementdriver/ItPrimaryReplicaChoiceTest.java
 
b/modules/placement-driver/src/integrationTest/java/org/apache/ignite/internal/placementdriver/ItPrimaryReplicaChoiceTest.java
index ad7f9b6d73..e9f3c60537 100644
--- 
a/modules/placement-driver/src/integrationTest/java/org/apache/ignite/internal/placementdriver/ItPrimaryReplicaChoiceTest.java
+++ 
b/modules/placement-driver/src/integrationTest/java/org/apache/ignite/internal/placementdriver/ItPrimaryReplicaChoiceTest.java
@@ -74,7 +74,6 @@ import org.apache.ignite.tx.TransactionOptions;
 import org.jetbrains.annotations.Nullable;
 import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Test;
-import org.junit.jupiter.api.TestInfo;
 
 /**
  * TODO: IGNITE-20485 Configure the lease interval as less as possible to 
decrease the duration of tests.
@@ -95,10 +94,7 @@ public class ItPrimaryReplicaChoiceTest extends 
ClusterPerTestIntegrationTest {
     private static final String SORTED_IDX = "SORTED_IDX";
 
     @BeforeEach
-    @Override
-    public void setup(TestInfo testInfo) throws Exception {
-        super.setup(testInfo);
-
+    public void setup() {
         String zoneSql = IgniteStringFormatter.format(
                 "CREATE ZONE IF NOT EXISTS {} WITH REPLICAS={}, PARTITIONS={}, 
STORAGE_PROFILES='{}'",
                 ZONE_NAME, 3, 1, 
TestProfileConfigurationSchema.TEST_PROFILE_NAME
diff --git 
a/modules/rest/src/integrationTest/java/org/apache/ignite/internal/rest/authentication/ItAuthenticationTest.java
 
b/modules/rest/src/integrationTest/java/org/apache/ignite/internal/rest/authentication/ItAuthenticationTest.java
index 08bf4b607b..a4d0e204e8 100644
--- 
a/modules/rest/src/integrationTest/java/org/apache/ignite/internal/rest/authentication/ItAuthenticationTest.java
+++ 
b/modules/rest/src/integrationTest/java/org/apache/ignite/internal/rest/authentication/ItAuthenticationTest.java
@@ -52,7 +52,7 @@ import org.junit.jupiter.api.extension.ExtendWith;
 @ExtendWith(WorkDirectoryExtension.class)
 public class ItAuthenticationTest extends ClusterPerTestIntegrationTest {
     /** HTTP client that is expected to be defined in subclasses. */
-    private HttpClient client;
+    private final HttpClient client = HttpClient.newBuilder().build();
 
     private String username = "admin";
 
@@ -62,9 +62,7 @@ public class ItAuthenticationTest extends 
ClusterPerTestIntegrationTest {
 
     @BeforeEach
     @Override
-    public void setup(TestInfo testInfo) {
-        client = HttpClient.newBuilder()
-                .build();
+    public void startCluster(TestInfo testInfo) {
     }
 
     @Override
@@ -86,7 +84,7 @@ public class ItAuthenticationTest extends 
ClusterPerTestIntegrationTest {
     @Test
     public void disabledAuthentication(TestInfo testInfo) throws Exception {
         enableAuth = false;
-        super.setup(testInfo);
+        super.startCluster(testInfo);
 
         // Then.
         
cluster.runningNodes().map(TestWrappers::unwrapIgniteImpl).forEach(node ->
@@ -98,7 +96,7 @@ public class ItAuthenticationTest extends 
ClusterPerTestIntegrationTest {
     public void defaultUser(TestInfo testInfo) throws Exception {
         username = null;
         password = null;
-        super.setup(testInfo);
+        super.startCluster(testInfo);
 
         // Authentication is enabled.
         Set<IgniteImpl> nodes = 
cluster.runningNodes().map(TestWrappers::unwrapIgniteImpl).collect(toSet());
@@ -115,7 +113,7 @@ public class ItAuthenticationTest extends 
ClusterPerTestIntegrationTest {
 
     @Test
     public void changeCredentials(TestInfo testInfo) throws Exception {
-        super.setup(testInfo);
+        super.startCluster(testInfo);
         Set<IgniteImpl> nodes = 
cluster.runningNodes().map(TestWrappers::unwrapIgniteImpl).collect(toSet());
 
         // Then.
@@ -154,7 +152,7 @@ public class ItAuthenticationTest extends 
ClusterPerTestIntegrationTest {
 
     @Test
     public void enableAuthenticationAndRestartNode(TestInfo testInfo) throws 
Exception {
-        super.setup(testInfo);
+        super.startCluster(testInfo);
         Set<IgniteImpl> nodes = 
cluster.runningNodes().map(TestWrappers::unwrapIgniteImpl).collect(toSet());
 
         // Then.
diff --git 
a/modules/runner/src/integrationTest/java/org/apache/ignite/internal/ItClusterTest.java
 
b/modules/runner/src/integrationTest/java/org/apache/ignite/internal/ItClusterTest.java
new file mode 100644
index 0000000000..84992b4540
--- /dev/null
+++ 
b/modules/runner/src/integrationTest/java/org/apache/ignite/internal/ItClusterTest.java
@@ -0,0 +1,66 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.internal;
+
+import static java.util.stream.Collectors.toList;
+import static org.hamcrest.MatcherAssert.assertThat;
+import static org.hamcrest.Matchers.empty;
+import static org.hamcrest.Matchers.hasSize;
+import static org.hamcrest.Matchers.is;
+
+import java.util.List;
+import org.apache.ignite.Ignite;
+import org.apache.ignite.internal.testframework.IgniteAbstractTest;
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.TestInfo;
+
+/**
+ * Tests for the {@link Cluster} class.
+ */
+public class ItClusterTest extends IgniteAbstractTest {
+    private Cluster cluster;
+
+    @BeforeEach
+    void setUp(TestInfo testInfo) {
+        cluster = new Cluster(testInfo, workDir);
+    }
+
+    @AfterEach
+    void tearDown() {
+        cluster.shutdown();
+    }
+
+    @Test
+    void noRunningNodesAfterClusterIsStopped() {
+        int nodeCount = 3;
+
+        cluster.startAndInit(nodeCount);
+
+        List<Ignite> runningNodes = cluster.runningNodes().collect(toList());
+
+        assertThat(runningNodes, hasSize(nodeCount));
+
+        cluster.shutdown();
+
+        runningNodes = cluster.runningNodes().collect(toList());
+
+        assertThat(runningNodes, is(empty()));
+    }
+}
diff --git 
a/modules/runner/src/integrationTest/java/org/apache/ignite/internal/runner/app/ItIgniteStopLogMessagesTest.java
 
b/modules/runner/src/integrationTest/java/org/apache/ignite/internal/runner/app/ItIgniteStopLogMessagesTest.java
index e75a69f831..6062d1db5b 100644
--- 
a/modules/runner/src/integrationTest/java/org/apache/ignite/internal/runner/app/ItIgniteStopLogMessagesTest.java
+++ 
b/modules/runner/src/integrationTest/java/org/apache/ignite/internal/runner/app/ItIgniteStopLogMessagesTest.java
@@ -85,8 +85,8 @@ public class ItIgniteStopLogMessagesTest extends 
ClusterPerTestIntegrationTest {
 
     @AfterEach
     @Override
-    public void tearDown() {
-        super.tearDown();
+    public void stopCluster() {
+        super.stopCluster();
 
         logInspectors.forEach(FailureMessageInspector::stop);
 
@@ -94,7 +94,7 @@ public class ItIgniteStopLogMessagesTest extends 
ClusterPerTestIntegrationTest {
     }
 
     /**
-     * Modifies the state of the cluster, actual assertions happen in the 
{@link #tearDown} method.
+     * Modifies the state of the cluster, actual assertions happen in the 
{@link #stopCluster} method.
      */
     @Test
     void testNoErrorMessagesOnStop() {
diff --git 
a/modules/runner/src/testFixtures/java/org/apache/ignite/internal/Cluster.java 
b/modules/runner/src/testFixtures/java/org/apache/ignite/internal/Cluster.java
index 0b2b5c68ef..881185456d 100644
--- 
a/modules/runner/src/testFixtures/java/org/apache/ignite/internal/Cluster.java
+++ 
b/modules/runner/src/testFixtures/java/org/apache/ignite/internal/Cluster.java
@@ -17,6 +17,7 @@
 
 package org.apache.ignite.internal;
 
+import static java.util.Collections.nCopies;
 import static java.util.stream.Collectors.joining;
 import static java.util.stream.Collectors.toList;
 import static org.apache.ignite.internal.TestWrappers.unwrapIgniteImpl;
@@ -34,6 +35,7 @@ import static org.junit.jupiter.api.Assertions.fail;
 import java.nio.file.Path;
 import java.util.ArrayList;
 import java.util.Arrays;
+import java.util.Collections;
 import java.util.List;
 import java.util.Objects;
 import java.util.Optional;
@@ -76,7 +78,6 @@ import org.junit.jupiter.api.TestInfo;
 /**
  * Cluster of nodes used for testing.
  */
-@SuppressWarnings("resource")
 public class Cluster {
     private static final IgniteLogger LOG = Loggers.forClass(Cluster.class);
 
@@ -114,7 +115,7 @@ public class Cluster {
     private final String defaultNodeBootstrapConfigTemplate;
 
     /** Embedded nodes. */
-    private final List<IgniteServer> igniteServers = new ArrayList<>();
+    private final List<IgniteServer> igniteServers = new 
CopyOnWriteArrayList<>();
 
     /** Cluster nodes. */
     private final List<Ignite> nodes = new CopyOnWriteArrayList<>();
@@ -274,7 +275,10 @@ public class Cluster {
         );
 
         IgniteServer node = TestIgnitionManager.start(nodeName, config, 
workDir.resolve(nodeName));
-        setListAtIndex(igniteServers, nodeIndex, node);
+
+        synchronized (igniteServers) {
+            setListAtIndex(igniteServers, nodeIndex, node);
+        }
 
         CompletableFuture<Void> registrationFuture = 
node.waitForInitAsync().thenRun(() -> {
             synchronized (nodes) {
@@ -283,7 +287,6 @@ public class Cluster {
 
             if (stopped) {
                 // Make sure we stop even a node that finished starting after 
the cluster has been stopped.
-
                 node.shutdown();
             }
         });
@@ -308,14 +311,16 @@ public class Cluster {
     }
 
     private static <T> void setListAtIndex(List<T> list, int i, T element) {
-        while (list.size() < i) {
-            list.add(null);
+        if (list.size() < i) {
+            list.addAll(nCopies(i - list.size(), null));
         }
 
         if (list.size() < i + 1) {
             list.add(element);
         } else {
-            list.set(i, element);
+            T prev = list.set(i, element);
+
+            assert prev == null : String.format("Found previous value %s at 
index %d", prev, i);
         }
     }
 
@@ -393,27 +398,18 @@ public class Cluster {
         return newIgniteNode;
     }
 
-    private void checkNodeIndex(int index) {
-        if (index < 0) {
-            throw new IllegalArgumentException("Index cannot be negative");
-        }
-        if (index >= nodes.size()) {
-            throw new IllegalArgumentException("Cluster only contains " + 
nodes.size() + " nodes, but node with index "
-                    + index + " was tried to be accessed");
-        }
-    }
-
     /**
      * Stops a node by index.
      *
      * @param index Node index in the cluster.
      */
     public void stopNode(int index) {
-        checkNodeIndex(index);
+        IgniteServer server = igniteServers.set(index, null);
 
-        igniteServers.get(index).shutdown();
+        if (server != null) {
+            server.shutdown();
+        }
 
-        igniteServers.set(index, null);
         nodes.set(index, null);
     }
 
@@ -513,7 +509,12 @@ public class Cluster {
     public void shutdown() {
         stopped = true;
 
-        
igniteServers.parallelStream().filter(Objects::nonNull).forEach(IgniteServer::shutdown);
+        List<IgniteServer> serversToStop = new ArrayList<>(igniteServers);
+
+        Collections.fill(igniteServers, null);
+        Collections.fill(nodes, null);
+
+        
serversToStop.parallelStream().filter(Objects::nonNull).forEach(IgniteServer::shutdown);
     }
 
     /**
diff --git 
a/modules/runner/src/testFixtures/java/org/apache/ignite/internal/ClusterPerClassIntegrationTest.java
 
b/modules/runner/src/testFixtures/java/org/apache/ignite/internal/ClusterPerClassIntegrationTest.java
index f8d68a6f11..9c2ddae217 100644
--- 
a/modules/runner/src/testFixtures/java/org/apache/ignite/internal/ClusterPerClassIntegrationTest.java
+++ 
b/modules/runner/src/testFixtures/java/org/apache/ignite/internal/ClusterPerClassIntegrationTest.java
@@ -60,6 +60,7 @@ import org.junit.jupiter.api.AfterAll;
 import org.junit.jupiter.api.BeforeAll;
 import org.junit.jupiter.api.TestInfo;
 import org.junit.jupiter.api.TestInstance;
+import org.junit.jupiter.api.Timeout;
 import org.junit.jupiter.api.extension.ExtendWith;
 
 /**
@@ -101,7 +102,7 @@ public abstract class ClusterPerClassIntegrationTest 
extends BaseIgniteAbstractT
      * @param testInfo Test information object.
      */
     @BeforeAll
-    protected void beforeAll(TestInfo testInfo) {
+    protected void startCluster(TestInfo testInfo) {
         CLUSTER = new Cluster(testInfo, WORK_DIR, 
getNodeBootstrapConfigTemplate());
 
         if (initialNodes() > 0 && needInitializeCluster()) {
@@ -145,7 +146,8 @@ public abstract class ClusterPerClassIntegrationTest 
extends BaseIgniteAbstractT
      * After all.
      */
     @AfterAll
-    void afterAll() {
+    @Timeout(60)
+    void stopCluster() {
         CLUSTER.shutdown();
     }
 
diff --git 
a/modules/runner/src/testFixtures/java/org/apache/ignite/internal/ClusterPerTestIntegrationTest.java
 
b/modules/runner/src/testFixtures/java/org/apache/ignite/internal/ClusterPerTestIntegrationTest.java
index caf99af27e..6b012c60d3 100644
--- 
a/modules/runner/src/testFixtures/java/org/apache/ignite/internal/ClusterPerTestIntegrationTest.java
+++ 
b/modules/runner/src/testFixtures/java/org/apache/ignite/internal/ClusterPerTestIntegrationTest.java
@@ -114,7 +114,7 @@ public abstract class ClusterPerTestIntegrationTest extends 
BaseIgniteAbstractTe
      * @throws Exception If failed.
      */
     @BeforeEach
-    public void setup(TestInfo testInfo) throws Exception {
+    public void startCluster(TestInfo testInfo) throws Exception {
         cluster = new Cluster(testInfo, workDir, 
getNodeBootstrapConfigTemplate());
 
         if (initialNodes() > 0) {
@@ -124,7 +124,7 @@ public abstract class ClusterPerTestIntegrationTest extends 
BaseIgniteAbstractTe
 
     @AfterEach
     @Timeout(60)
-    public void tearDown() {
+    public void stopCluster() {
         cluster.shutdown();
     }
 
diff --git 
a/modules/sql-engine/src/integrationTest/java/org/apache/ignite/internal/sql/engine/ItIndexesSystemViewTest.java
 
b/modules/sql-engine/src/integrationTest/java/org/apache/ignite/internal/sql/engine/ItIndexesSystemViewTest.java
index db9b4f5939..7743a388d1 100644
--- 
a/modules/sql-engine/src/integrationTest/java/org/apache/ignite/internal/sql/engine/ItIndexesSystemViewTest.java
+++ 
b/modules/sql-engine/src/integrationTest/java/org/apache/ignite/internal/sql/engine/ItIndexesSystemViewTest.java
@@ -31,7 +31,6 @@ import org.apache.ignite.internal.sql.SqlCommon;
 import org.apache.ignite.internal.testframework.IgniteTestUtils;
 import org.junit.jupiter.api.BeforeAll;
 import org.junit.jupiter.api.Test;
-import org.junit.jupiter.api.TestInfo;
 
 /** End-to-end tests to verify indexes system view. */
 public class ItIndexesSystemViewTest extends BaseSqlIntegrationTest {
@@ -41,11 +40,8 @@ public class ItIndexesSystemViewTest extends 
BaseSqlIntegrationTest {
 
     private static final String COLUMNS_COLLATIONS = "ID DESC, NAME ASC";
 
-    @Override
     @BeforeAll
-    protected void beforeAll(TestInfo testInfo) {
-        super.beforeAll(testInfo);
-
+    void beforeAll() {
         IgniteTestUtils.await(systemViewManager().completeRegistration());
     }
 
diff --git 
a/modules/sql-engine/src/integrationTest/java/org/apache/ignite/internal/sql/engine/ItSystemViewsTest.java
 
b/modules/sql-engine/src/integrationTest/java/org/apache/ignite/internal/sql/engine/ItSystemViewsTest.java
index 8145624245..a340698e14 100644
--- 
a/modules/sql-engine/src/integrationTest/java/org/apache/ignite/internal/sql/engine/ItSystemViewsTest.java
+++ 
b/modules/sql-engine/src/integrationTest/java/org/apache/ignite/internal/sql/engine/ItSystemViewsTest.java
@@ -27,7 +27,6 @@ import 
org.apache.ignite.internal.testframework.IgniteTestUtils;
 import org.apache.ignite.sql.ColumnType;
 import org.junit.jupiter.api.BeforeAll;
 import org.junit.jupiter.api.Test;
-import org.junit.jupiter.api.TestInfo;
 import org.junit.jupiter.params.ParameterizedTest;
 import org.junit.jupiter.params.provider.EnumSource;
 
@@ -53,11 +52,8 @@ public class ItSystemViewsTest extends 
BaseSqlIntegrationTest {
         }
     }
 
-    @Override
     @BeforeAll
-    protected void beforeAll(TestInfo testInfo) {
-        super.beforeAll(testInfo);
-
+    void beforeAll() {
         IgniteTestUtils.await(systemViewManager().completeRegistration());
     }
 
diff --git 
a/modules/sql-engine/src/integrationTest/java/org/apache/ignite/internal/sql/engine/ItZonesSystemViewTest.java
 
b/modules/sql-engine/src/integrationTest/java/org/apache/ignite/internal/sql/engine/ItZonesSystemViewTest.java
index 4562cb35b8..5930bedc9b 100644
--- 
a/modules/sql-engine/src/integrationTest/java/org/apache/ignite/internal/sql/engine/ItZonesSystemViewTest.java
+++ 
b/modules/sql-engine/src/integrationTest/java/org/apache/ignite/internal/sql/engine/ItZonesSystemViewTest.java
@@ -33,7 +33,6 @@ import org.apache.ignite.internal.sql.BaseSqlIntegrationTest;
 import org.apache.ignite.internal.testframework.IgniteTestUtils;
 import org.junit.jupiter.api.BeforeAll;
 import org.junit.jupiter.api.Test;
-import org.junit.jupiter.api.TestInfo;
 
 /**
  * End-to-end tests to verify zones system view.
@@ -43,11 +42,8 @@ public class ItZonesSystemViewTest extends 
BaseSqlIntegrationTest {
 
     private static final String ALTER_ZONE_NAME = "NEW_TEST_ZONE";
 
-    @Override
     @BeforeAll
-    protected void beforeAll(TestInfo testInfo) {
-        super.beforeAll(testInfo);
-
+    void beforeAll() {
         IgniteTestUtils.await(systemViewManager().completeRegistration());
     }
 
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 85348fd70c..60e38da79c 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.table.distributed.PublicApiThreadingTable;
 import org.junit.jupiter.api.AfterEach;
 import org.junit.jupiter.api.BeforeAll;
 import org.junit.jupiter.api.Test;
-import org.junit.jupiter.api.TestInfo;
 
 /** For integration testing of disaster recovery system views. */
 public class ItDisasterRecoverySystemViewTest extends BaseSqlIntegrationTest {
@@ -49,11 +48,8 @@ public class ItDisasterRecoverySystemViewTest extends 
BaseSqlIntegrationTest {
         return 2;
     }
 
-    @Override
     @BeforeAll
-    protected void beforeAll(TestInfo testInfo) {
-        super.beforeAll(testInfo);
-
+    void beforeAll() {
         assertThat(systemViewManager().completeRegistration(), 
willCompleteSuccessfully());
     }
 
diff --git 
a/modules/table/src/integrationTest/java/org/apache/ignite/internal/table/ItCriteriaQueryTest.java
 
b/modules/table/src/integrationTest/java/org/apache/ignite/internal/table/ItCriteriaQueryTest.java
index e56aa4f996..2867b779bc 100644
--- 
a/modules/table/src/integrationTest/java/org/apache/ignite/internal/table/ItCriteriaQueryTest.java
+++ 
b/modules/table/src/integrationTest/java/org/apache/ignite/internal/table/ItCriteriaQueryTest.java
@@ -76,7 +76,6 @@ import org.hamcrest.Matcher;
 import org.hamcrest.Matchers;
 import org.junit.jupiter.api.AfterAll;
 import org.junit.jupiter.api.BeforeAll;
-import org.junit.jupiter.api.TestInfo;
 import org.junit.jupiter.params.ParameterizedTest;
 import org.junit.jupiter.params.provider.Arguments;
 import org.junit.jupiter.params.provider.MethodSource;
@@ -101,10 +100,7 @@ public class ItCriteriaQueryTest extends 
ClusterPerClassIntegrationTest {
 
     /** {@inheritDoc} */
     @BeforeAll
-    @Override
-    protected void beforeAll(TestInfo testInfo) {
-        super.beforeAll(testInfo);
-
+    void beforeAll() {
         CLIENT = IgniteClient.builder()
                 .addresses("127.0.0.1:" + 
unwrapIgniteImpl(CLUSTER.aliveNode()).clientAddress().port()).build();
 
diff --git 
a/modules/table/src/integrationTest/java/org/apache/ignite/internal/table/ItOperationRetryTest.java
 
b/modules/table/src/integrationTest/java/org/apache/ignite/internal/table/ItOperationRetryTest.java
index 460d7c02ea..b83c906717 100644
--- 
a/modules/table/src/integrationTest/java/org/apache/ignite/internal/table/ItOperationRetryTest.java
+++ 
b/modules/table/src/integrationTest/java/org/apache/ignite/internal/table/ItOperationRetryTest.java
@@ -43,7 +43,6 @@ import org.apache.ignite.table.Tuple;
 import org.apache.ignite.tx.Transaction;
 import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Test;
-import org.junit.jupiter.api.TestInfo;
 
 /**
  * Tests of transaction operation retry.
@@ -55,10 +54,7 @@ public class ItOperationRetryTest extends 
ClusterPerTestIntegrationTest {
     private static final int PART_ID = 0;
 
     @BeforeEach
-    @Override
-    public void setup(TestInfo testInfo) throws Exception {
-        super.setup(testInfo);
-
+    public void setup() throws Exception {
         String zoneSql = "create zone test_zone with partitions=1, replicas=3, 
storage_profiles='" + DEFAULT_PROFILE_NAME + "'";
         String sql = "create table " + TABLE_NAME + " (key int primary key, 
val varchar(20)) with primary_zone='TEST_ZONE'";
 
diff --git 
a/modules/table/src/integrationTest/java/org/apache/ignite/internal/table/ItTransactionPrimaryChangeTest.java
 
b/modules/table/src/integrationTest/java/org/apache/ignite/internal/table/ItTransactionPrimaryChangeTest.java
index b91a164309..16e5b12581 100644
--- 
a/modules/table/src/integrationTest/java/org/apache/ignite/internal/table/ItTransactionPrimaryChangeTest.java
+++ 
b/modules/table/src/integrationTest/java/org/apache/ignite/internal/table/ItTransactionPrimaryChangeTest.java
@@ -44,7 +44,6 @@ import org.apache.ignite.table.Tuple;
 import org.apache.ignite.tx.Transaction;
 import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Test;
-import org.junit.jupiter.api.TestInfo;
 
 /**
  * Integration tests for the transactions running while the primary changes, 
not related to the tx recovery.
@@ -68,10 +67,7 @@ public class ItTransactionPrimaryChangeTest extends 
ClusterPerTestIntegrationTes
             + "}";
 
     @BeforeEach
-    @Override
-    public void setup(TestInfo testInfo) throws Exception {
-        super.setup(testInfo);
-
+    public void setup() throws Exception {
         String zoneSql = "create zone test_zone with partitions=1, replicas=3, 
storage_profiles='" + DEFAULT_AIPERSIST_PROFILE_NAME + "'";
         String sql = "create table " + TABLE_NAME + " (key int primary key, 
val varchar(20)) with primary_zone='TEST_ZONE'";
 
diff --git 
a/modules/table/src/integrationTest/java/org/apache/ignite/internal/table/ItTransactionRecoveryTest.java
 
b/modules/table/src/integrationTest/java/org/apache/ignite/internal/table/ItTransactionRecoveryTest.java
index 7755b0ba6e..a99541dca8 100644
--- 
a/modules/table/src/integrationTest/java/org/apache/ignite/internal/table/ItTransactionRecoveryTest.java
+++ 
b/modules/table/src/integrationTest/java/org/apache/ignite/internal/table/ItTransactionRecoveryTest.java
@@ -98,7 +98,6 @@ import org.apache.ignite.tx.TransactionOptions;
 import org.jetbrains.annotations.Nullable;
 import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Test;
-import org.junit.jupiter.api.TestInfo;
 import org.junit.jupiter.api.extension.ExtendWith;
 import org.junit.jupiter.params.ParameterizedTest;
 import org.junit.jupiter.params.provider.ValueSource;
@@ -117,10 +116,7 @@ public class ItTransactionRecoveryTest extends 
ClusterPerTestIntegrationTest {
     private static final int PART_ID = 0;
 
     @BeforeEach
-    @Override
-    public void setup(TestInfo testInfo) throws Exception {
-        super.setup(testInfo);
-
+    public void setup() throws Exception {
         String zoneSql = "create zone test_zone with partitions=1, replicas=3, 
storage_profiles='" + DEFAULT_STORAGE_PROFILE + "'";
         String sql = "create table " + TABLE_NAME + " (key int primary key, 
val varchar(20)) with primary_zone='TEST_ZONE'";
 
diff --git 
a/modules/table/src/integrationTest/java/org/apache/ignite/internal/table/ItTxResourcesVacuumTest.java
 
b/modules/table/src/integrationTest/java/org/apache/ignite/internal/table/ItTxResourcesVacuumTest.java
index 81033be1e5..66355d77d9 100644
--- 
a/modules/table/src/integrationTest/java/org/apache/ignite/internal/table/ItTxResourcesVacuumTest.java
+++ 
b/modules/table/src/integrationTest/java/org/apache/ignite/internal/table/ItTxResourcesVacuumTest.java
@@ -78,7 +78,6 @@ import org.jetbrains.annotations.Nullable;
 import org.junit.jupiter.api.AfterEach;
 import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Test;
-import org.junit.jupiter.api.TestInfo;
 import org.junit.jupiter.api.extension.ExtendWith;
 
 /**
@@ -117,10 +116,7 @@ public class ItTxResourcesVacuumTest extends 
ClusterPerTestIntegrationTest {
     );
 
     @BeforeEach
-    @Override
-    public void setup(TestInfo testInfo) throws Exception {
-        super.setup(testInfo);
-
+    public void setup() throws Exception {
         String zoneSql = "create zone test_zone with partitions=20, replicas=" 
+ REPLICAS
                 + ", storage_profiles='" + DEFAULT_STORAGE_PROFILE + "'";
         String sql = "create table " + TABLE_NAME + " (key bigint primary key, 
val varchar(20)) with primary_zone='TEST_ZONE'";
@@ -131,12 +127,9 @@ public class ItTxResourcesVacuumTest extends 
ClusterPerTestIntegrationTest {
         });
     }
 
-    @Override
     @AfterEach
     public void tearDown() {
         shutdownAndAwaitTermination(txStateStorageExecutor, 10, 
TimeUnit.SECONDS);
-
-        super.tearDown();
     }
 
     @Override

Reply via email to