Class AbstractIncrementalSnapshotTest<T extends org.apache.kafka.connect.source.SourceConnector>
java.lang.Object
io.debezium.embedded.AbstractConnectorTest
io.debezium.embedded.async.AbstractAsyncEngineConnectorTest
io.debezium.pipeline.source.snapshot.incremental.AbstractSnapshotTest<T>
io.debezium.pipeline.source.snapshot.incremental.AbstractIncrementalSnapshotTest<T>
- All Implemented Interfaces:
Testing
- Direct Known Subclasses:
AbstractIncrementalSnapshotWithSchemaChangesSupportTest
public abstract class AbstractIncrementalSnapshotTest<T extends org.apache.kafka.connect.source.SourceConnector>
extends AbstractSnapshotTest<T>
-
Nested Class Summary
Nested classes/interfaces inherited from class io.debezium.embedded.AbstractConnectorTest
AbstractConnectorTest.SourceRecordsNested classes/interfaces inherited from interface io.debezium.util.Testing
Testing.Debug, Testing.Files, Testing.InterruptableFunction, Testing.Network, Testing.Print, Testing.Timer -
Field Summary
FieldsFields inherited from class io.debezium.pipeline.source.snapshot.incremental.AbstractSnapshotTest
PARTITION_NO, ROW_COUNT, SCHEMA_HISTORY_PATH, SERVER_NAME, signalsFileFields inherited from class io.debezium.embedded.AbstractConnectorTest
consumedLines, engine, isEngineRunning, logger, logTestName, OFFSET_STORE_PATH, pollTimeoutInMs, skipTestRule -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate voidassertCorrectIncrementalSnapshotNotification(List<org.apache.kafka.connect.source.SourceRecord> notifications) private voidprotected booleanconsumeAnyRemainingIncrementalSnapshotEventsAndCheckForStopMessage(LogInterceptor interceptor, String stopMessage) protected intprotected Stringprotected Stringprivate static BiPredicate<Integer,org.apache.kafka.connect.source.SourceRecord> voidvoidvoidinserts()voidvoidvoidvoidprotected Stringprotected abstract Stringprotected abstract Stringvoidvoidprotected StringreturnedIdentifierName(String queriedID) protected voidprotected voidprotected voidsendAdHocSnapshotSignalAndWait(String... collectionIds) protected voidsendAdHocSnapshotStopSignal(String... dataCollectionIds) protected voidsendAdHocSnapshotStopSignalAndWait(String... collectionIds) protected voidsendExecuteSnapshotKafkaSignal(String fullTableNames) protected voidsendKafkaSignal(String signalValue) protected voidprotected voidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidupdates()voidvoidvoidMethods inherited from class io.debezium.pipeline.source.snapshot.incremental.AbstractSnapshotTest
alterTableAddColumnStatement, alterTableDropColumnStatement, config, connector, connectorClass, consumeMixedWithIncrementalSnapshot, consumeMixedWithIncrementalSnapshot, consumeMixedWithIncrementalSnapshot, consumeMixedWithIncrementalSnapshot, consumeMixedWithIncrementalSnapshot, consumeMixedWithIncrementalSnapshot, consumeRecordsMixedWithIncrementalSnapshot, consumeRecordsMixedWithIncrementalSnapshot, database, databaseConnection, getMaximumEnqueuedRecordCount, getRecordValue, mutableConfig, pkFieldName, populate4PkTable, populateTable, populateTable, populateTable, populateTable, populateTables, populateTables, populateTableWithSpecificValue, sendAdHocSnapshotSignal, sendAdHocSnapshotSignalWithAdditionalConditionsWithSurrogateKey, sendAdHocSnapshotSignalWithAdditionalConditionsWithSurrogateKey, sendAdHocSnapshotSignalWithAdditionalConditionWithSurrogateKey, sendAdHocSnapshotSignalWithAdditionalConditionWithSurrogateKey, sendExecuteSnapshotFileSignal, sendExecuteSnapshotFileSignal, server, signalTableName, signalTableNameSanitized, startConnector, startConnector, startConnector, startConnector, startConnectorWithSnapshot, tableDataCollectionId, tableDataCollectionIds, tableName, tableNames, task, topicName, topicNames, valueFieldName, waitForCdcTransactionPropagation, waitForConnectorToStartMethods inherited from class io.debezium.embedded.async.AbstractAsyncEngineConnectorTest
createEngine, createEngineBuilderMethods 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, consumeAvailableRecordsByTopic, consumeDmlRecordsByTopic, consumeDmlRecordsByTopic, consumeDmlRecordsByTopic, consumeRecord, consumeRecords, consumeRecords, consumeRecords, consumeRecordsButSkipUntil, consumeRecordsByTopic, consumeRecordsByTopic, consumeRecordsByTopic, consumeRecordsByTopicUntil, consumeRecordsUntil, debug, getConsumer, getSnapshotMetricsObjectName, getSnapshotMetricsObjectName, getSnapshotMetricsObjectName, getStreamingMetricsObjectName, getStreamingMetricsObjectName, getStreamingMetricsObjectName, getStreamingMetricsObjectName, getStreamingNamespace, initializeConnectorTestFramework, isStreamingRunning, isStreamingRunning, isStreamingRunning, isStreamingRunning, isTransactionRecord, loggingCompletion, print, readLastCommittedOffset, readLastCommittedOffsets, setConsumeTimeout, skipAvroValidation, start, start, start, start, start, start, start, startAndConsumeTillEnd, startAndConsumeTillEnd, stopConnector, stopConnector, storeOffsets, validate, waitForAvailableRecords, waitForConnectorShutdown, waitForEngineShutdown, waitForSnapshotToBeCompleted, waitForSnapshotToBeCompleted, waitForSnapshotWithCustomMetricsToBeCompleted, waitForStreamingRunning, waitForStreamingRunning, waitForStreamingRunning, waitForStreamingWithCustomMetricsToStart, waitTimeForEngine, waitTimeForRecords, waitTimeForRecordsAfterNulls
-
Field Details
-
kafka
-
-
Constructor Details
-
AbstractIncrementalSnapshotTest
public AbstractIncrementalSnapshotTest()
-
-
Method Details
-
getSignalTypeFieldName
-
noPKTopicName
-
noPKTableName
-
noPKTableDataCollectionId
-
returnedIdentifierName
-
sendAdHocSnapshotStopSignal
- Throws:
SQLException
-
sendAdHocSnapshotSignal
- Throws:
SQLException
-
sendAdHocKafkaSnapshotSignal
-
sendExecuteSnapshotKafkaSignal
protected void sendExecuteSnapshotKafkaSignal(String fullTableNames) throws ExecutionException, InterruptedException -
getSignalsTopic
-
sendKafkaSignal
-
sendPauseSignal
protected void sendPauseSignal() -
sendResumeSignal
protected void sendResumeSignal() -
snapshotOnly
- Throws:
Exception
-
invalidTablesInTheList
- Throws:
Exception
-
inserts
- Throws:
Exception
-
insertsWithKafkaSnapshotSignal
- Throws:
Exception
-
insertsWithoutPks
- Throws:
Exception
-
insertsWithoutPksAndNull
- Throws:
Exception
-
updates
- Throws:
Exception
-
updatesWithRestart
- Throws:
Exception
-
updatesLargeChunk
- Throws:
Exception
-
snapshotOnlyWithRestart
- Throws:
Exception
-
whenSnapshotMultipleTablesAndConnectorRestartsThenOnlyNotAlreadyProcessedTableMustBeProcessed
@FixFor("DBZ-7716") public void whenSnapshotMultipleTablesAndConnectorRestartsThenOnlyNotAlreadyProcessedTableMustBeProcessed() throws Exception- Throws:
Exception
-
snapshotPreceededBySchemaChange
- Throws:
Exception
-
snapshotWithRegexDataCollections
- Throws:
Exception
-
snapshotWithDuplicateDataCollections
- Throws:
Exception
-
stopCurrentIncrementalSnapshotWithoutCollectionsAndTakeNewNewIncrementalSnapshotAfterRestart
@FixFor("DBZ-4271") public void stopCurrentIncrementalSnapshotWithoutCollectionsAndTakeNewNewIncrementalSnapshotAfterRestart() throws Exception- Throws:
Exception
-
stopCurrentIncrementalSnapshotWithAllCollectionsAndTakeNewNewIncrementalSnapshotAfterRestart
@FixFor("DBZ-4271") public void stopCurrentIncrementalSnapshotWithAllCollectionsAndTakeNewNewIncrementalSnapshotAfterRestart() throws Exception- Throws:
Exception
-
removeNotYetCapturedCollectionFromInProgressIncrementalSnapshot
@FixFor("DBZ-4271") public void removeNotYetCapturedCollectionFromInProgressIncrementalSnapshot() throws Exception- Throws:
Exception
-
removeStartedCapturedCollectionFromInProgressIncrementalSnapshot
@FixFor("DBZ-4271") public void removeStartedCapturedCollectionFromInProgressIncrementalSnapshot() throws Exception- Throws:
Exception
-
shouldSnapshotNewlyAddedTableToIncludeListAfterRestart
@FixFor("DBZ-4834") public void shouldSnapshotNewlyAddedTableToIncludeListAfterRestart() throws Exception- Throws:
Exception
-
testPauseDuringSnapshot
- Throws:
Exception
-
snapshotWithAdditionalCondition
- Throws:
Exception
-
snapshotWithNewAdditionalConditionsField
- Throws:
Exception
-
shouldExecuteRegularSnapshotWhenAdditionalConditionEmpty
- Throws:
Exception
-
snapshotWithAdditionalConditionWithRestart
- Throws:
Exception
-
snapshotWithSurrogateKey
- Throws:
Exception
-
snapshotWithAdditionalConditionWithSurrogateKey
- Throws:
Exception
-
testNotification
- Throws:
Exception
-
insertInsertWatermarkingStrategy
- Throws:
Exception
-
insertDeleteWatermarkingStrategy
- Throws:
Exception
-
assertOpenCloseEventCount
private void assertOpenCloseEventCount(JdbcConnection.ResultSetConsumer consumer) throws SQLException - Throws:
SQLException
-
defaultIncrementalSnapshotChunkSize
protected int defaultIncrementalSnapshotChunkSize() -
incrementalSnapshotCompleted
private static BiPredicate<Integer,org.apache.kafka.connect.source.SourceRecord> incrementalSnapshotCompleted() -
assertCorrectIncrementalSnapshotNotification
private void assertCorrectIncrementalSnapshotNotification(List<org.apache.kafka.connect.source.SourceRecord> notifications) -
sendAdHocSnapshotSignalAndWait
- Throws:
Exception
-
sendAdHocSnapshotStopSignalAndWait
- Throws:
Exception
-
consumeAnyRemainingIncrementalSnapshotEventsAndCheckForStopMessage
protected boolean consumeAnyRemainingIncrementalSnapshotEventsAndCheckForStopMessage(LogInterceptor interceptor, String stopMessage) throws Exception - Throws:
Exception
-