Class AbstractIncrementalSnapshotTest<T extends org.apache.kafka.connect.source.SourceConnector>
- java.lang.Object
-
- io.debezium.embedded.AbstractConnectorTest
-
- io.debezium.pipeline.source.snapshot.incremental.AbstractIncrementalSnapshotTest<T>
-
- All Implemented Interfaces:
Testing
public abstract class AbstractIncrementalSnapshotTest<T extends org.apache.kafka.connect.source.SourceConnector> extends AbstractConnectorTest
-
-
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 protected static PathDB_HISTORY_PATHprivate static intMAXIMUM_NO_RECORDS_CONSUMESprivate static intROW_COUNT-
Fields inherited from class io.debezium.embedded.AbstractConnectorTest
engine, logger, logTestName, OFFSET_STORE_PATH, pollTimeoutInMs, skipTestRule
-
-
Constructor Summary
Constructors Constructor Description AbstractIncrementalSnapshotTest()
-
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, getSnapshotMetricsObjectName, getStreamingMetricsObjectName, getStreamingMetricsObjectName, getStreamingNamespace, initializeConnectorTestFramework, isStreamingRunning, isStreamingRunning, isTransactionRecord, loggingCompletion, print, readLastCommittedOffset, readLastCommittedOffsets, setConsumeTimeout, skipAvroValidation, start, start, start, start, start, startAndConsumeTillEnd, stopConnector, stopConnector, validate, waitForAvailableRecords, waitForConnectorShutdown, waitForSnapshotToBeCompleted, waitForStreamingRunning, waitForStreamingRunning, waitTimeForRecords, waitTimeForRecordsAfterNulls
-
-
-
-
Field Detail
-
ROW_COUNT
private static final int ROW_COUNT
- See Also:
- Constant Field Values
-
MAXIMUM_NO_RECORDS_CONSUMES
private static final int MAXIMUM_NO_RECORDS_CONSUMES
- See Also:
- Constant Field Values
-
DB_HISTORY_PATH
protected static final Path DB_HISTORY_PATH
-
-
Method Detail
-
databaseConnection
protected abstract JdbcConnection databaseConnection()
-
topicName
protected abstract String topicName()
-
tableName
protected abstract String tableName()
-
signalTableName
protected abstract String signalTableName()
-
config
protected abstract Configuration.Builder config()
-
populateTable
protected void populateTable(JdbcConnection connection) throws SQLException
- Throws:
SQLException
-
populateTable
protected void populateTable() throws SQLException- Throws:
SQLException
-
consumeMixedWithIncrementalSnapshot
protected Map<Integer,Integer> consumeMixedWithIncrementalSnapshot(int recordCount) throws InterruptedException
- Throws:
InterruptedException
-
consumeMixedWithIncrementalSnapshot
protected Map<Integer,Integer> consumeMixedWithIncrementalSnapshot(int recordCount, Predicate<Map.Entry<Integer,Integer>> dataCompleted, Consumer<List<org.apache.kafka.connect.source.SourceRecord>> recordConsumer) throws InterruptedException
- Throws:
InterruptedException
-
valueFieldName
protected String valueFieldName()
-
pkFieldName
protected String pkFieldName()
-
sendAdHocSnapshotSignal
protected void sendAdHocSnapshotSignal() throws SQLException- Throws:
SQLException
-
startConnector
protected void startConnector(Function<Configuration.Builder,Configuration.Builder> custConfig)
-
startConnector
protected void startConnector()
-
waitForConnectorToStart
protected void waitForConnectorToStart()
-
getMaximumEnqueuedRecordCount
protected int getMaximumEnqueuedRecordCount()
Description copied from class:AbstractConnectorTestGet the maximum number of messages that can be obtained from the connector and held in-memory before they are consumed by test methods usingAbstractConnectorTest.consumeRecord(),AbstractConnectorTest.consumeRecords(int), orAbstractConnectorTest.consumeRecords(int, Consumer).By default this method return
100.- Overrides:
getMaximumEnqueuedRecordCountin classAbstractConnectorTest- Returns:
- the maximum number of records that can be enqueued
-
-