Package io.debezium.connector.mysql
Class SnapshotSourceIT
- java.lang.Object
-
- io.debezium.embedded.AbstractConnectorTest
-
- io.debezium.connector.mysql.SnapshotSourceIT
-
- All Implemented Interfaces:
Testing
public class SnapshotSourceIT extends AbstractConnectorTest
- Author:
- Randall Hauch
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class io.debezium.embedded.AbstractConnectorTest
AbstractConnectorTest.SourceRecords
-
Nested classes/interfaces inherited from interface io.debezium.util.Testing
Testing.Debug, Testing.Files, Testing.InterruptableFunction, Testing.Network, Testing.Print, Testing.Timer
-
-
Field Summary
Fields Modifier and Type Field Description private UniqueDatabaseBINARY_FIELD_DATABASEprivate Configurationconfigprivate UniqueDatabaseDATABASEprivate static PathDB_HISTORY_PATHprivate Function<org.apache.kafka.connect.source.SourceRecord,String>getTableNameFromSourceRecordprivate UniqueDatabaseOTHER_DATABASESkipTestRuleskipRule-
Fields inherited from class io.debezium.embedded.AbstractConnectorTest
engine, logger, logTestName, OFFSET_STORE_PATH, pollTimeoutInMs, skipTestRule
-
-
Constructor Summary
Constructors Constructor Description SnapshotSourceIT()
-
Method Summary
-
Methods inherited from class io.debezium.embedded.AbstractConnectorTest
assertBeginTransaction, assertConfigurationErrors, assertConfigurationErrors, assertConfigurationErrors, assertConnectorIsRunning, assertConnectorNotRunning, assertDelete, assertEndTransaction, assertEngineIsRunning, assertHasNoSourceQuery, assertInsert, assertKey, assertNoConfigurationErrors, assertNoRecordsToConsume, assertOffset, assertOffset, assertOnlyTransactionRecordsToConsume, assertRecordTransactionMetadata, assertSchemaMatchesStruct, assertSchemaMatchesStruct, assertSourceQuery, assertTombstone, assertTombstone, assertUpdate, assertValueField, configValue, consumeAvailableRecords, consumeDmlRecordsByTopic, consumeDmlRecordsByTopic, consumeDmlRecordsByTopic, consumeRecord, consumeRecords, consumeRecords, consumeRecords, consumeRecordsByTopic, consumeRecordsByTopic, consumeRecordsByTopic, debug, getMaximumEnqueuedRecordCount, getSnapshotMetricsObjectName, getStreamingMetricsObjectName, getStreamingMetricsObjectName, getStreamingNamespace, initializeConnectorTestFramework, isStreamingRunning, isStreamingRunning, isTransactionRecord, loggingCompletion, print, readLastCommittedOffset, readLastCommittedOffsets, setConsumeTimeout, skipAvroValidation, start, start, start, start, start, startAndConsumeTillEnd, startAndConsumeTillEnd, stopConnector, stopConnector, validate, waitForAvailableRecords, waitForConnectorShutdown, waitForSnapshotToBeCompleted, waitForStreamingRunning, waitForStreamingRunning, waitTimeForRecords, waitTimeForRecordsAfterNulls
-
-
-
-
Field Detail
-
DB_HISTORY_PATH
private static final Path DB_HISTORY_PATH
-
DATABASE
private final UniqueDatabase DATABASE
-
OTHER_DATABASE
private final UniqueDatabase OTHER_DATABASE
-
BINARY_FIELD_DATABASE
private final UniqueDatabase BINARY_FIELD_DATABASE
-
config
private Configuration config
-
skipRule
public SkipTestRule skipRule
-
-
Method Detail
-
beforeEach
public void beforeEach()
-
afterEach
public void afterEach()
-
simpleConfig
protected Configuration.Builder simpleConfig()
-
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
-
snapshotWithBackupLocksShouldNotWaitForReads
public void snapshotWithBackupLocksShouldNotWaitForReads() throws Exception- Throws:
Exception
-
shouldCreateSnapshotSelectively
@FixFor("DBZ-2456") public void shouldCreateSnapshotSelectively() throws Exception
- Throws:
Exception
-
shouldSnapshotCorrectlyReadFields
@FixFor("DBZ-3238") public void shouldSnapshotCorrectlyReadFields() throws Exception
- Throws:
Exception
-
shouldCreateSnapshotOfSingleDatabaseUsingInsertEvents
public void shouldCreateSnapshotOfSingleDatabaseUsingInsertEvents() throws Exception- Throws:
Exception
-
productsTableName
private 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
-
shouldSnapshotTablesInOrderSpecifiedInTablesWhitelist
public void shouldSnapshotTablesInOrderSpecifiedInTablesWhitelist() 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
private long toMicroSeconds(String duration)
-
-