Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;

@MicronautTest(rebuildContext = true)
@MicronautTest
@WireMockTest
class NodeUnitInspectCallTest {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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() {
Expand All @@ -60,7 +58,7 @@ protected void setupBaseVersion(Ignite baseIgnite) {
}

@Test
void testMetastorageRaftSnapshotCompatibility() throws InterruptedException {
void testMetastorageRaftSnapshotCompatibility() {
cluster.stop();

startEmbeddedClusterAndAwaitRebalance(2);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -32,7 +31,6 @@
/** Compatibility tests for metastorage storage. */
@ParameterizedClass
@MethodSource("baseVersions")
@MicronautTest(rebuildContext = true)
public class ItMetastorageStorageCompatibilityTest extends CompatibilityTestBase {
@Override
protected int nodesCount() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -42,7 +41,6 @@
/** Compatibility tests for vault storage. */
@ParameterizedClass
@MethodSource("baseVersions")
@MicronautTest(rebuildContext = true)
public class ItVaultStorageCompatibilityTest extends CompatibilityTestBase {
@Override
protected int nodesCount() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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")
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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);
Expand All @@ -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);
Expand All @@ -129,7 +130,7 @@ void eventsTest(boolean securityEnabled, TestInfo testInfo) throws Exception {
)) {
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));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -64,13 +65,15 @@
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;

/**
* Test suite for {@link RestComponent}.
*/
@ExtendWith(ConfigurationExtension.class)
public class RestComponentTest extends BaseIgniteAbstractTest {
private final RestManager restManager = new RestManager();

Expand Down