This is an automated email from the ASF dual-hosted git repository.
mpochatkin 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 e8b18ee5c41 IGNITE-27863 Remove excessive context rebuilds (#7601)
e8b18ee5c41 is described below
commit e8b18ee5c417da662bc5b0b2197ccb51bf2f08c3
Author: Vadim Pakhnushev <[email protected]>
AuthorDate: Tue Feb 24 16:23:51 2026 +0300
IGNITE-27863 Remove excessive context rebuilds (#7601)
---
.../cli/call/node/unit/NodeUnitInspectCallTest.java | 2 +-
.../internal/ItCmgRaftSnapshotCompatibilityTest.java | 2 --
.../ItMetastorageRaftSnapshotCompatibilityTest.java | 4 +---
.../internal/ItMetastorageStorageCompatibilityTest.java | 2 --
.../ignite/internal/ItVaultStorageCompatibilityTest.java | 2 --
.../ignite/internal/MetastorageRaftCompatibilityTest.java | 2 --
.../ignite/internal/PersistentCompatibilityTest.java | 9 +++------
.../ItClusterStateHttpServerFilterInitializedTest.java | 2 +-
.../ItClusterStateHttpServerFilterNotInitializedTest.java | 2 +-
.../configuration/ItNodeConfigurationControllerTest.java | 2 +-
.../deployment/ItDeploymentManagementControllerTest.java | 2 +-
.../ignite/internal/rest/events/ItRestEventsTest.java | 15 ++++++++-------
.../apache/ignite/internal/rest/RestComponentTest.java | 3 +++
13 files changed, 20 insertions(+), 29 deletions(-)
diff --git
a/modules/cli/src/test/java/org/apache/ignite/internal/cli/call/node/unit/NodeUnitInspectCallTest.java
b/modules/cli/src/test/java/org/apache/ignite/internal/cli/call/node/unit/NodeUnitInspectCallTest.java
index 5d6fab0a2f8..58d0f153ea9 100644
---
a/modules/cli/src/test/java/org/apache/ignite/internal/cli/call/node/unit/NodeUnitInspectCallTest.java
+++
b/modules/cli/src/test/java/org/apache/ignite/internal/cli/call/node/unit/NodeUnitInspectCallTest.java
@@ -38,7 +38,7 @@ import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
-@MicronautTest(rebuildContext = true)
+@MicronautTest
@WireMockTest
class NodeUnitInspectCallTest {
diff --git
a/modules/compatibility-tests/src/integrationTest/java/org/apache/ignite/internal/ItCmgRaftSnapshotCompatibilityTest.java
b/modules/compatibility-tests/src/integrationTest/java/org/apache/ignite/internal/ItCmgRaftSnapshotCompatibilityTest.java
index 366d8f23b12..274f8d83f27 100644
---
a/modules/compatibility-tests/src/integrationTest/java/org/apache/ignite/internal/ItCmgRaftSnapshotCompatibilityTest.java
+++
b/modules/compatibility-tests/src/integrationTest/java/org/apache/ignite/internal/ItCmgRaftSnapshotCompatibilityTest.java
@@ -22,7 +22,6 @@ import static org.awaitility.Awaitility.await;
import static org.hamcrest.core.Is.is;
import static org.junit.jupiter.api.Assertions.assertDoesNotThrow;
-import io.micronaut.test.extensions.junit5.annotation.MicronautTest;
import org.apache.ignite.Ignite;
import org.apache.ignite.client.IgniteClient;
import org.apache.ignite.internal.cluster.management.CmgGroupId;
@@ -35,7 +34,6 @@ import org.junit.jupiter.params.provider.MethodSource;
/** Compatibility tests for CMG raft snapshot. */
@ParameterizedClass
@MethodSource("baseVersions")
-@MicronautTest(rebuildContext = true)
public class ItCmgRaftSnapshotCompatibilityTest extends CompatibilityTestBase {
@Override
protected boolean restartWithCurrentEmbeddedVersion() {
diff --git
a/modules/compatibility-tests/src/integrationTest/java/org/apache/ignite/internal/ItMetastorageRaftSnapshotCompatibilityTest.java
b/modules/compatibility-tests/src/integrationTest/java/org/apache/ignite/internal/ItMetastorageRaftSnapshotCompatibilityTest.java
index d03299dfc1e..614816b72de 100644
---
a/modules/compatibility-tests/src/integrationTest/java/org/apache/ignite/internal/ItMetastorageRaftSnapshotCompatibilityTest.java
+++
b/modules/compatibility-tests/src/integrationTest/java/org/apache/ignite/internal/ItMetastorageRaftSnapshotCompatibilityTest.java
@@ -23,7 +23,6 @@ import static
org.apache.ignite.internal.TestWrappers.unwrapIgniteImpl;
import static org.apache.ignite.internal.jobs.DeploymentUtils.runJob;
import static org.awaitility.Awaitility.await;
-import io.micronaut.test.extensions.junit5.annotation.MicronautTest;
import org.apache.ignite.Ignite;
import org.apache.ignite.internal.compute.SendAllMetastorageCommandTypesJob;
import org.apache.ignite.internal.compute.TruncateRaftLogCommand;
@@ -37,7 +36,6 @@ import org.junit.jupiter.params.provider.MethodSource;
/** Compatibility tests for metastorage raft snapshot. */
@ParameterizedClass
@MethodSource("baseVersions")
-@MicronautTest(rebuildContext = true)
public class ItMetastorageRaftSnapshotCompatibilityTest extends
CompatibilityTestBase {
@Override
protected boolean restartWithCurrentEmbeddedVersion() {
@@ -60,7 +58,7 @@ public class ItMetastorageRaftSnapshotCompatibilityTest
extends CompatibilityTes
}
@Test
- void testMetastorageRaftSnapshotCompatibility() throws
InterruptedException {
+ void testMetastorageRaftSnapshotCompatibility() {
cluster.stop();
startEmbeddedClusterAndAwaitRebalance(2);
diff --git
a/modules/compatibility-tests/src/integrationTest/java/org/apache/ignite/internal/ItMetastorageStorageCompatibilityTest.java
b/modules/compatibility-tests/src/integrationTest/java/org/apache/ignite/internal/ItMetastorageStorageCompatibilityTest.java
index f91820e5cb5..c2617810282 100644
---
a/modules/compatibility-tests/src/integrationTest/java/org/apache/ignite/internal/ItMetastorageStorageCompatibilityTest.java
+++
b/modules/compatibility-tests/src/integrationTest/java/org/apache/ignite/internal/ItMetastorageStorageCompatibilityTest.java
@@ -21,7 +21,6 @@ import static
org.apache.ignite.internal.CompatibilityTestCommon.TABLE_NAME_TEST
import static
org.apache.ignite.internal.CompatibilityTestCommon.createDefaultTables;
import static org.apache.ignite.internal.jobs.DeploymentUtils.runJob;
-import io.micronaut.test.extensions.junit5.annotation.MicronautTest;
import org.apache.ignite.Ignite;
import org.apache.ignite.internal.compute.SendAllMetastorageCommandTypesJob;
import org.apache.ignite.internal.jobs.DeploymentUtils;
@@ -32,7 +31,6 @@ import org.junit.jupiter.params.provider.MethodSource;
/** Compatibility tests for metastorage storage. */
@ParameterizedClass
@MethodSource("baseVersions")
-@MicronautTest(rebuildContext = true)
public class ItMetastorageStorageCompatibilityTest extends
CompatibilityTestBase {
@Override
protected int nodesCount() {
diff --git
a/modules/compatibility-tests/src/integrationTest/java/org/apache/ignite/internal/ItVaultStorageCompatibilityTest.java
b/modules/compatibility-tests/src/integrationTest/java/org/apache/ignite/internal/ItVaultStorageCompatibilityTest.java
index a9de49603e6..b7b63752a98 100644
---
a/modules/compatibility-tests/src/integrationTest/java/org/apache/ignite/internal/ItVaultStorageCompatibilityTest.java
+++
b/modules/compatibility-tests/src/integrationTest/java/org/apache/ignite/internal/ItVaultStorageCompatibilityTest.java
@@ -29,7 +29,6 @@ import static org.hamcrest.Matchers.is;
import static org.hamcrest.Matchers.notNullValue;
import static org.hamcrest.Matchers.nullValue;
-import io.micronaut.test.extensions.junit5.annotation.MicronautTest;
import org.apache.ignite.Ignite;
import org.apache.ignite.internal.app.IgniteImpl;
import org.apache.ignite.internal.compute.PutVaultEntriesJob;
@@ -42,7 +41,6 @@ import org.junit.jupiter.params.provider.MethodSource;
/** Compatibility tests for vault storage. */
@ParameterizedClass
@MethodSource("baseVersions")
-@MicronautTest(rebuildContext = true)
public class ItVaultStorageCompatibilityTest extends CompatibilityTestBase {
@Override
protected int nodesCount() {
diff --git
a/modules/compatibility-tests/src/integrationTest/java/org/apache/ignite/internal/MetastorageRaftCompatibilityTest.java
b/modules/compatibility-tests/src/integrationTest/java/org/apache/ignite/internal/MetastorageRaftCompatibilityTest.java
index 8d9c42e56c0..f5568add2f6 100644
---
a/modules/compatibility-tests/src/integrationTest/java/org/apache/ignite/internal/MetastorageRaftCompatibilityTest.java
+++
b/modules/compatibility-tests/src/integrationTest/java/org/apache/ignite/internal/MetastorageRaftCompatibilityTest.java
@@ -24,7 +24,6 @@ import static
org.apache.ignite.internal.jobs.DeploymentUtils.runJob;
import static
org.apache.ignite.internal.testframework.IgniteTestUtils.waitForCondition;
import static org.junit.jupiter.api.Assertions.assertTrue;
-import io.micronaut.test.extensions.junit5.annotation.MicronautTest;
import java.nio.file.Files;
import java.nio.file.Path;
import org.apache.ignite.Ignite;
@@ -41,7 +40,6 @@ import org.junit.jupiter.params.provider.MethodSource;
/** Compatibility tests for metastorage raft log. */
@ParameterizedClass
@MethodSource("baseVersions")
-@MicronautTest(rebuildContext = true)
public class MetastorageRaftCompatibilityTest extends CompatibilityTestBase {
@Override
protected boolean restartWithCurrentEmbeddedVersion() {
diff --git
a/modules/compatibility-tests/src/integrationTest/java/org/apache/ignite/internal/PersistentCompatibilityTest.java
b/modules/compatibility-tests/src/integrationTest/java/org/apache/ignite/internal/PersistentCompatibilityTest.java
index 816d2a76c49..5d3be6b607f 100644
---
a/modules/compatibility-tests/src/integrationTest/java/org/apache/ignite/internal/PersistentCompatibilityTest.java
+++
b/modules/compatibility-tests/src/integrationTest/java/org/apache/ignite/internal/PersistentCompatibilityTest.java
@@ -23,8 +23,6 @@ import static
org.apache.ignite.internal.testframework.matchers.CompletableFutur
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.is;
-import io.micronaut.test.extensions.junit5.annotation.MicronautTest;
-import java.io.IOException;
import java.util.List;
import java.util.concurrent.CompletableFuture;
import org.apache.ignite.Ignite;
@@ -69,7 +67,6 @@ import org.junit.jupiter.params.provider.ValueSource;
*/
@ParameterizedClass
@MethodSource("baseVersions")
-@MicronautTest(rebuildContext = true)
// In older versions ThreadAssertingStorageEngine doesn't implement wrapper
interface, so it's not possible to cast it to
// PersistentPageMemoryStorageEngine
@WithSystemProperty(key = IgniteSystemProperties.THREAD_ASSERTIONS_ENABLED,
value = "false")
@@ -151,7 +148,7 @@ public class PersistentCompatibilityTest extends
CompatibilityTestBase {
}
@Test
- void testNewVersionWithNewDeltaFiles() throws IOException {
+ void testNewVersionWithNewDeltaFiles() {
String newRowValue = "new_row";
insertRow(node(0), TABLE_WITH_NEW_DELTA_FILES, 5, newRowValue);
@@ -179,11 +176,11 @@ public class PersistentCompatibilityTest extends
CompatibilityTestBase {
assertThat(estimatedSizeFut.join(), is(EXPECTED_ROWS));
}
- private void doCheckpointWithCompaction() throws IOException {
+ private void doCheckpointWithCompaction() {
doCheckpoint(false);
}
- private void doCheckpointWithoutCompaction() throws IOException {
+ private void doCheckpointWithoutCompaction() {
doCheckpoint(true);
}
diff --git
a/modules/rest/src/integrationTest/java/org/apache/ignite/internal/rest/ItClusterStateHttpServerFilterInitializedTest.java
b/modules/rest/src/integrationTest/java/org/apache/ignite/internal/rest/ItClusterStateHttpServerFilterInitializedTest.java
index c8c27461ebe..cbcd58a3d12 100644
---
a/modules/rest/src/integrationTest/java/org/apache/ignite/internal/rest/ItClusterStateHttpServerFilterInitializedTest.java
+++
b/modules/rest/src/integrationTest/java/org/apache/ignite/internal/rest/ItClusterStateHttpServerFilterInitializedTest.java
@@ -33,7 +33,7 @@ import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.MethodSource;
/** Tests that after cluster is initialized, all endpoints are available. */
-@MicronautTest(rebuildContext = true)
+@MicronautTest
public class ItClusterStateHttpServerFilterInitializedTest extends
ClusterPerClassIntegrationTest {
private static final String NODE_URL = "http://localhost:" +
ClusterConfiguration.DEFAULT_BASE_HTTP_PORT;
diff --git
a/modules/rest/src/integrationTest/java/org/apache/ignite/internal/rest/ItClusterStateHttpServerFilterNotInitializedTest.java
b/modules/rest/src/integrationTest/java/org/apache/ignite/internal/rest/ItClusterStateHttpServerFilterNotInitializedTest.java
index 1a82432b5aa..c56373c8db5 100644
---
a/modules/rest/src/integrationTest/java/org/apache/ignite/internal/rest/ItClusterStateHttpServerFilterNotInitializedTest.java
+++
b/modules/rest/src/integrationTest/java/org/apache/ignite/internal/rest/ItClusterStateHttpServerFilterNotInitializedTest.java
@@ -41,7 +41,7 @@ import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.MethodSource;
/** Tests that before cluster is initialized, only a subset of endpoints are
available. */
-@MicronautTest(rebuildContext = true)
+@MicronautTest
public class ItClusterStateHttpServerFilterNotInitializedTest extends
ClusterPerClassIntegrationTest {
private static final String NODE_URL = "http://localhost:" +
ClusterConfiguration.DEFAULT_BASE_HTTP_PORT;
diff --git
a/modules/rest/src/integrationTest/java/org/apache/ignite/internal/rest/configuration/ItNodeConfigurationControllerTest.java
b/modules/rest/src/integrationTest/java/org/apache/ignite/internal/rest/configuration/ItNodeConfigurationControllerTest.java
index 9a78fd0f431..eeadaf7313b 100644
---
a/modules/rest/src/integrationTest/java/org/apache/ignite/internal/rest/configuration/ItNodeConfigurationControllerTest.java
+++
b/modules/rest/src/integrationTest/java/org/apache/ignite/internal/rest/configuration/ItNodeConfigurationControllerTest.java
@@ -44,7 +44,7 @@ import org.junit.jupiter.api.Test;
/**
* Test suite for {@link NodeConfigurationController}.
*/
-@MicronautTest(rebuildContext = true)
+@MicronautTest
public class ItNodeConfigurationControllerTest extends
ClusterPerTestIntegrationTest {
private static final String NODE_URL = "http://localhost:" +
ClusterConfiguration.DEFAULT_BASE_HTTP_PORT;
diff --git
a/modules/rest/src/integrationTest/java/org/apache/ignite/internal/rest/deployment/ItDeploymentManagementControllerTest.java
b/modules/rest/src/integrationTest/java/org/apache/ignite/internal/rest/deployment/ItDeploymentManagementControllerTest.java
index d4f5b18594d..3a04f8d2943 100644
---
a/modules/rest/src/integrationTest/java/org/apache/ignite/internal/rest/deployment/ItDeploymentManagementControllerTest.java
+++
b/modules/rest/src/integrationTest/java/org/apache/ignite/internal/rest/deployment/ItDeploymentManagementControllerTest.java
@@ -81,7 +81,7 @@ import org.junit.jupiter.api.Test;
/**
* Integration test for REST controller {@link DeploymentManagementController}.
*/
-@MicronautTest(rebuildContext = true)
+@MicronautTest
public class ItDeploymentManagementControllerTest extends
ClusterPerClassIntegrationTest {
private static final String NODE_URL = "http://localhost:" +
ClusterConfiguration.DEFAULT_BASE_HTTP_PORT;
diff --git
a/modules/rest/src/integrationTest/java/org/apache/ignite/internal/rest/events/ItRestEventsTest.java
b/modules/rest/src/integrationTest/java/org/apache/ignite/internal/rest/events/ItRestEventsTest.java
index 12042056888..95d19ee4dc8 100644
---
a/modules/rest/src/integrationTest/java/org/apache/ignite/internal/rest/events/ItRestEventsTest.java
+++
b/modules/rest/src/integrationTest/java/org/apache/ignite/internal/rest/events/ItRestEventsTest.java
@@ -61,14 +61,15 @@ import org.junit.jupiter.params.provider.ValueSource;
/**
* Integration test for REST events.
*/
-@MicronautTest(rebuildContext = true)
+@MicronautTest
@Property(name = "ignite.endpoints.rest-events", value = "true")
class ItRestEventsTest extends ClusterPerTestIntegrationTest {
private static final String NODE_URL = "http://localhost:" +
ClusterConfiguration.DEFAULT_BASE_HTTP_PORT;
- private static final @Nullable String username = "admin";
- private static final @Nullable String password = "password";
+ private static final String USERNAME = "admin";
+ private static final String PASSWORD = "password";
+
+ private final EventLogInspector logInspector = new EventLogInspector();
- private EventLogInspector logInspector = new EventLogInspector();
private boolean securityEnabled = true;
@Inject
@@ -105,7 +106,7 @@ class ItRestEventsTest extends
ClusterPerTestIntegrationTest {
String confSecurity = "ignite.security.enabled=" + securityEnabled +
",\n"
+ " ignite.security.authentication.providers.default={"
+ " type=basic,"
- + " users=[{username=" + username + ",password=" + password +
"}]"
+ + " users=[{username=" + USERNAME + ",password=" + PASSWORD +
"}]"
+ "}";
builder.clusterConfiguration(confEvents + "," + confSecurity);
@@ -117,7 +118,7 @@ class ItRestEventsTest extends
ClusterPerTestIntegrationTest {
this.securityEnabled = securityEnabled;
EventUser user = securityEnabled
- ? EventUser.of(username, "basic")
+ ? EventUser.of(USERNAME, "basic")
: EventUser.of("anonymous", "anonymous");
super.startCluster(testInfo);
@@ -129,7 +130,7 @@ class ItRestEventsTest extends
ClusterPerTestIntegrationTest {
)) {
MutableHttpRequest<Object> request = HttpRequest.GET(uri);
if (securityEnabled) {
- request.header("Authorization",
basicAuthenticationHeader(username, password));
+ request.header("Authorization",
basicAuthenticationHeader(USERNAME, PASSWORD));
}
assertDoesNotThrow(() -> client.toBlocking().retrieve(request));
}
diff --git
a/modules/rest/src/test/java/org/apache/ignite/internal/rest/RestComponentTest.java
b/modules/rest/src/test/java/org/apache/ignite/internal/rest/RestComponentTest.java
index f357a55c589..80500c5ae94 100644
---
a/modules/rest/src/test/java/org/apache/ignite/internal/rest/RestComponentTest.java
+++
b/modules/rest/src/test/java/org/apache/ignite/internal/rest/RestComponentTest.java
@@ -44,6 +44,7 @@ import
org.apache.ignite.internal.configuration.ConfigurationRegistry;
import org.apache.ignite.internal.configuration.ConfigurationTreeGenerator;
import org.apache.ignite.internal.configuration.NodeConfiguration;
import
org.apache.ignite.internal.configuration.storage.TestConfigurationStorage;
+import
org.apache.ignite.internal.configuration.testframework.ConfigurationExtension;
import
org.apache.ignite.internal.configuration.testframework.InjectConfiguration;
import
org.apache.ignite.internal.configuration.validation.TestConfigurationValidator;
import org.apache.ignite.internal.eventlog.api.EventLog;
@@ -64,6 +65,7 @@ import
org.apache.ignite.internal.testframework.BaseIgniteAbstractTest;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.extension.ExtendWith;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.EnumSource;
import org.mockito.Mockito;
@@ -71,6 +73,7 @@ import org.mockito.Mockito;
/**
* Test suite for {@link RestComponent}.
*/
+@ExtendWith(ConfigurationExtension.class)
public class RestComponentTest extends BaseIgniteAbstractTest {
private final RestManager restManager = new RestManager();