Class TestUtils


  • public class TestUtils
    extends Object
    • Constructor Detail

      • TestUtils

        public TestUtils()
    • Method Detail

      • 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 .
        • generateCommitLogFile

          public static File generateCommitLogFile()
          Generate a commit log file with current timestamp in memory
        • 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