Class MigrationTestBase
java.lang.Object
org.apache.ignite.migrationtools.tests.bases.MigrationTestBase
@DisabledIfSystemProperty(named="tests.containers.support",
matches="false",
disabledReason="Lack of support in TeamCity for testcontainers")
@ExtendWith(FullSampleCluster.class)
public class MigrationTestBase
extends Object
Base class for the migration tests.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final Ignite3ClusterContainerprotected static final MigrationToolsContainerprotected static final org.testcontainers.containers.Network -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic org.testcontainers.containers.Container.ExecResultmigrateCache(MigrationToolsContainer migrationToolsContainer, int nodeIdx, String cacheName, String migrationMode, String clusterAddress, Map.Entry<String, String> credentials, Path logsFolder) Executes the migration cache command in a container running the migration tools.static voidmigrationIsSuccessfull(String cacheName, String migrationMode) Assert that the migration is successfull.
-
Field Details
-
NODE_NAMES
-
network
protected static final org.testcontainers.containers.Network network -
AI3_CLUSTER
-
MIGRATION_TOOLS_CONTAINER
-
-
Constructor Details
-
MigrationTestBase
public MigrationTestBase()
-
-
Method Details
-
migrationIsSuccessfull
public static void migrationIsSuccessfull(String cacheName, String migrationMode) throws IOException, InterruptedException Assert that the migration is successfull.- Throws:
IOExceptionInterruptedException
-
migrateCache
public static org.testcontainers.containers.Container.ExecResult migrateCache(MigrationToolsContainer migrationToolsContainer, int nodeIdx, String cacheName, String migrationMode, String clusterAddress, @Nullable Map.Entry<String, String> credentials, Path logsFolder) throws IOException, InterruptedExceptionExecutes the migration cache command in a container running the migration tools.- Parameters:
migrationToolsContainer- Migration tools container.nodeIdx- Index of the node in the sample cluster to migrate from.cacheName- Cacha name.migrationMode- Migration Mode.clusterAddress- Cluster address.credentials- Cluster credentials, if any.logsFolder- Logs folder to print the logs.- Returns:
- The execution result.
- Throws:
IOException- IOException.InterruptedException- InterruptionException.
-