Class BinlogSnapshotSourceIT<C extends org.apache.kafka.connect.source.SourceConnector>

All Implemented Interfaces:
BinlogConnectorTest<C>, Testing
Direct Known Subclasses:
BinlogSnapshotParallelSourceIT

public abstract class BinlogSnapshotSourceIT<C extends org.apache.kafka.connect.source.SourceConnector> extends AbstractBinlogConnectorIT<C>
Author:
Randall Hauch
  • Field Details

    • SCHEMA_HISTORY_PATH

      private static final Path SCHEMA_HISTORY_PATH
    • DATABASE

      protected final UniqueDatabase DATABASE
    • OTHER_DATABASE

      protected final UniqueDatabase OTHER_DATABASE
    • BINARY_FIELD_DATABASE

      protected final UniqueDatabase BINARY_FIELD_DATABASE
    • CONFLICT_NAMES_DATABASE

      protected final UniqueDatabase CONFLICT_NAMES_DATABASE
    • config

      protected Configuration config
    • skipDatabaseTypeRule

      public org.junit.rules.TestRule skipDatabaseTypeRule
    • skipRule

      public SkipTestRule skipRule
    • getTableNameFromSourceRecord

      private final Function<org.apache.kafka.connect.source.SourceRecord,String> getTableNameFromSourceRecord
  • Constructor Details

    • BinlogSnapshotSourceIT

      public BinlogSnapshotSourceIT()
  • Method Details

    • beforeEach

      public void beforeEach()
    • afterEach

      public void afterEach()
    • simpleConfig

      protected Configuration.Builder simpleConfig()
    • getSnapshotLockingModeField

      protected abstract Field getSnapshotLockingModeField()
    • getSnapshotLockingModeMinimal

      protected abstract String getSnapshotLockingModeMinimal()
    • getSnapshotLockingModeNone

      protected abstract String getSnapshotLockingModeNone()
    • shouldCreateSnapshotOfSingleDatabase

      public void shouldCreateSnapshotOfSingleDatabase() throws Exception
      Throws:
      Exception
    • shouldCreateSnapshotOfSingleDatabaseWithoutGlobalLock

      public void shouldCreateSnapshotOfSingleDatabaseWithoutGlobalLock() throws Exception
      Throws:
      Exception
    • shouldCreateSnapshotOfSingleDatabaseWithoutGlobalLockAndStoreOnlyCapturedTables

      public void shouldCreateSnapshotOfSingleDatabaseWithoutGlobalLockAndStoreOnlyCapturedTables() throws Exception
      Throws:
      Exception
    • shouldCreateSnapshotOfSingleDatabaseNoData

      public void shouldCreateSnapshotOfSingleDatabaseNoData() throws Exception
      Throws:
      Exception
    • shouldCreateSnapshotOfSingleDatabaseWithoutGlobalLockNoData

      public void shouldCreateSnapshotOfSingleDatabaseWithoutGlobalLockNoData() throws Exception
      Throws:
      Exception
    • shouldCreateSnapshotOfSingleDatabaseWithoutGlobalLockAndStoreOnlyCapturedTablesNoData

      public void shouldCreateSnapshotOfSingleDatabaseWithoutGlobalLockAndStoreOnlyCapturedTablesNoData() throws Exception
      Throws:
      Exception
    • snapshotOfSingleDatabase

      private void snapshotOfSingleDatabase(boolean useGlobalLock, boolean storeOnlyCapturedTables, boolean data) throws Exception
      Throws:
      Exception
    • shouldCreateSnapshotSelectively

      @FixFor("DBZ-2456") public void shouldCreateSnapshotSelectively() throws Exception
      Throws:
      Exception
    • shouldNotFailStreamingOnNonSnapshottedTable

      @FixFor("DBZ-3952") public void shouldNotFailStreamingOnNonSnapshottedTable() throws Exception
      Throws:
      Exception
    • shouldSnapshotCorrectlyReadFields

      @FixFor("DBZ-3238") public void shouldSnapshotCorrectlyReadFields() throws Exception
      Throws:
      Exception
    • shouldCreateSnapshotOfSingleDatabaseUsingInsertEvents

      public void shouldCreateSnapshotOfSingleDatabaseUsingInsertEvents() throws Exception
      Throws:
      Exception
    • productsTableName

      protected String productsTableName() throws SQLException
      Throws:
      SQLException
    • shouldCreateSnapshotOfSingleDatabaseWithSchemaChanges

      public void shouldCreateSnapshotOfSingleDatabaseWithSchemaChanges() throws Exception
      Throws:
      Exception
    • shouldCreateSnapshotSchemaOnlyRecovery_exception

      public void shouldCreateSnapshotSchemaOnlyRecovery_exception() throws Exception
      Throws:
      Exception
    • shouldCreateSnapshotSchemaOnlyRecovery

      public void shouldCreateSnapshotSchemaOnlyRecovery() throws Exception
      Throws:
      Exception
    • shouldSnapshotTablesInOrderSpecifiedInTableIncludeList

      public void shouldSnapshotTablesInOrderSpecifiedInTableIncludeList() throws Exception
      Throws:
      Exception
    • shouldSnapshotTablesInOrderSpecifiedInTableIncludeListWithConflictingNames

      @FixFor("DBZ-6533") public void shouldSnapshotTablesInOrderSpecifiedInTableIncludeListWithConflictingNames() throws Exception
      Throws:
      Exception
    • shouldSnapshotTablesInRowCountOrderAsc

      public void shouldSnapshotTablesInRowCountOrderAsc() throws Exception
      Throws:
      Exception
    • shouldSnapshotTablesInRowCountOrderDesc

      public void shouldSnapshotTablesInRowCountOrderDesc() throws Exception
      Throws:
      Exception
    • shouldSnapshotTablesInLexicographicalOrder

      public void shouldSnapshotTablesInLexicographicalOrder() throws Exception
      Throws:
      Exception
    • getTableNamesInSpecifiedOrder

      private LinkedHashSet<String> getTableNamesInSpecifiedOrder(String... tables)
    • shouldCreateSnapshotSchemaOnly

      public void shouldCreateSnapshotSchemaOnly() throws Exception
      Throws:
      Exception
    • toMicroSeconds

      protected long toMicroSeconds(String duration)