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 Details

    • NODE_NAMES

      protected static final List<String> NODE_NAMES
    • network

      protected static final org.testcontainers.containers.Network network
    • AI3_CLUSTER

      protected static final Ignite3ClusterContainer AI3_CLUSTER
    • MIGRATION_TOOLS_CONTAINER

      protected static final MigrationToolsContainer 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:
      IOException
      InterruptedException
    • 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, InterruptedException
      Executes 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.