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 5d6fab0a2f83..58d0f153ea9b 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.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 366d8f23b122..274f8d83f275 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.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 @@ /** 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 d03299dfc1ee..614816b72ded 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.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 @@ /** 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 @@ protected void setupBaseVersion(Ignite baseIgnite) { } @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 f91820e5cb5f..c26178102820 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.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 @@ /** 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 a9de49603e6c..b7b63752a98b 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.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 @@ /** 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 8d9c42e56c0f..f5568add2f61 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.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 @@ /** 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 816d2a76c491..5d3be6b607f9 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.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 @@ */ @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 @@ void testNewVersion(String tableName) { } @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 @@ void testEstimatedSize() { 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 c8c27461ebe6..cbcd58a3d12e 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.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 1a82432b5aa8..c56373c8db57 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.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 9a78fd0f431c..eeadaf7313b8 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 @@ /** * 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 d4f5b18594d5..3a04f8d2943f 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 @@ /** * 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 12042056888c..95d19ee4dc85 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 @@ /** * 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 @@ protected void customizeInitParameters(InitParametersBuilder builder) { 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 @@ void eventsTest(boolean securityEnabled, TestInfo testInfo) throws Exception { 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 @@ void eventsTest(boolean securityEnabled, TestInfo testInfo) throws Exception { )) { MutableHttpRequest 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 f357a55c589e..80500c5ae94a 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.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.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 @@ /** * Test suite for {@link RestComponent}. */ +@ExtendWith(ConfigurationExtension.class) public class RestComponentTest extends BaseIgniteAbstractTest { private final RestManager restManager = new RestManager();