Class TestUtils

java.lang.Object
io.debezium.connector.cassandra.TestUtils

public class TestUtils extends Object
  • Field Details

  • Constructor Details

    • TestUtils

      public TestUtils()
  • Method Details

    • generateDefaultConfigMap

      protected static Properties generateDefaultConfigMap() throws IOException
      Throws:
      IOException
    • propertiesForContext

      protected static HashMap<String,Object> propertiesForContext() throws IOException
      Throws:
      IOException
    • createTestKeyspace

      public static void createTestKeyspace()
    • getTables

      public static List<String> getTables(com.datastax.oss.driver.api.core.CqlSession session)
    • truncateTestKeyspaceTableData

      public static void truncateTestKeyspaceTableData()
    • deleteTestKeyspaceTables

      public static void deleteTestKeyspaceTables()
    • runCql

      public static void runCql(String statement)
    • runCql

      public static void runCql(com.datastax.oss.driver.api.core.cql.SimpleStatement statement)
    • deleteTestOffsets

      public static void deleteTestOffsets(io.debezium.connector.cassandra.CassandraConnectorContext context) throws IOException
      Delete all files in offset backing store directory
      Throws:
      IOException
    • keyspaceTable

      public static String keyspaceTable(String tableName)
      Return the full name of the test table in the form of .
    • populateFakeCommitLogsForDirectory

      public static void populateFakeCommitLogsForDirectory(int numOfFiles, File directory) throws IOException
      Generate commit log files in directory
      Throws:
      IOException
    • clearCommitLogFromDirectory

      public static void clearCommitLogFromDirectory(File directory, boolean recursive) throws IOException
      Delete all commit log files in directory
      Throws:
      IOException