Package io.debezium.pipeline
Class AbstractBlockingSnapshotTest
java.lang.Object
io.debezium.embedded.AbstractConnectorTest
io.debezium.pipeline.source.snapshot.incremental.AbstractSnapshotTest
io.debezium.pipeline.AbstractBlockingSnapshotTest
- All Implemented Interfaces:
Testing
-
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
FieldsModifier and TypeFieldDescriptionprotected static final intprivate intFields inherited from class io.debezium.pipeline.source.snapshot.incremental.AbstractSnapshotTest
PARTITION_NO, SCHEMA_HISTORY_PATH, SERVER_NAMEFields inherited from class io.debezium.embedded.AbstractConnectorTest
consumedLines, engine, logger, logTestName, OFFSET_STORE_PATH, pollTimeoutInMs, skipTestRule -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate voidassertRecordsFromSnapshotAndStreamingArePresent(int expectedRecords) private voidassertRecordsWithValuesPresent(int expectedRecords, List<Integer> expectedValues, String topicName) private voidassertStreamingRecordsArePresent(int expectedRecords) protected abstract Stringprotected abstract JdbcConnectionprivate Future<?>executeAsync(Runnable operation) voidvoidvoidgetExpectedValues(Long totalSnapshotRecords) private LonggetTotalSnapshotRecords(String table, String connector, String server, String task, String database) protected intprivate voidinsertRecords(int rowCount, int startingPkId) private voidinsertRecordsWithRandomSleep(int rowCount, int startingPkId, int maxSleep) private voidinsertRecordsWithRandomSleep(int rowCount, int startingPkId, int maxSleep, Runnable actionOnInsert) private Runnableprotected abstract Configuration.BuildermutableConfig(boolean signalTableOnly, boolean storeOnlyCapturedDdl) protected abstract Stringserver()protected abstract Stringprotected abstract Stringprivate static voidwaitForLogMessage(String message, Class<?> logEmitterClass) Methods inherited from class io.debezium.pipeline.source.snapshot.incremental.AbstractSnapshotTest
alterTableAddColumnStatement, alterTableDropColumnStatement, config, connectorClass, consumeMixedWithIncrementalSnapshot, consumeMixedWithIncrementalSnapshot, consumeMixedWithIncrementalSnapshot, consumeMixedWithIncrementalSnapshot, consumeMixedWithIncrementalSnapshot, consumeRecordsMixedWithIncrementalSnapshot, consumeRecordsMixedWithIncrementalSnapshot, database, getMaximumEnqueuedRecordCount, getRecordValue, pkFieldName, populate4PkTable, populateTable, populateTable, populateTable, populateTable, populateTables, populateTables, populateTableWithSpecificValue, sendAdHocSnapshotSignal, sendAdHocSnapshotSignalWithAdditionalConditionsWithSurrogateKey, sendAdHocSnapshotSignalWithAdditionalConditionsWithSurrogateKey, sendAdHocSnapshotSignalWithAdditionalConditionWithSurrogateKey, sendAdHocSnapshotSignalWithAdditionalConditionWithSurrogateKey, signalTableName, signalTableNameSanitized, startConnector, startConnector, startConnector, startConnector, startConnectorWithSnapshot, tableDataCollectionId, tableDataCollectionIds, tableNames, task, topicNames, valueFieldName, waitForCdcTransactionPropagation, waitForConnectorToStartMethods 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, validate, waitForAvailableRecords, waitForConnectorShutdown, waitForNotInitialState, waitForSnapshotToBeCompleted, waitForSnapshotToBeCompleted, waitForSnapshotWithCustomMetricsToBeCompleted, waitForStreamingRunning, waitForStreamingRunning, waitForStreamingRunning, waitForStreamingWithCustomMetricsToStart, waitTimeForRecords, waitTimeForRecordsAfterNulls
-
Field Details
-
signalingRecords
private int signalingRecords -
ROW_COUNT
protected static final int ROW_COUNT- See Also:
-
-
Constructor Details
-
AbstractBlockingSnapshotTest
public AbstractBlockingSnapshotTest()
-
-
Method Details
-
mutableConfig
protected abstract Configuration.Builder mutableConfig(boolean signalTableOnly, boolean storeOnlyCapturedDdl) - Specified by:
mutableConfigin classAbstractSnapshotTest
-
databaseConnection
- Specified by:
databaseConnectionin classAbstractSnapshotTest
-
topicName
- Specified by:
topicNamein classAbstractSnapshotTest
-
tableName
- Specified by:
tableNamein classAbstractSnapshotTest
-
connector
- Specified by:
connectorin classAbstractSnapshotTest
-
server
- Specified by:
serverin classAbstractSnapshotTest
-
executeBlockingSnapshot
- Throws:
Exception
-
executeBlockingSnapshotWhileStreaming
- Throws:
Exception
-
executeBlockingSnapshotWithAdditionalCondition
- Throws:
Exception
-
insertMaxSleep
protected int insertMaxSleep() -
insertTask
-
getTotalSnapshotRecords
private Long getTotalSnapshotRecords(String table, String connector, String server, String task, String database) throws MalformedObjectNameException, ReflectionException, AttributeNotFoundException, InstanceNotFoundException, MBeanException -
getExpectedValues
-
waitForLogMessage
-
executeAsync
-
assertStreamingRecordsArePresent
- Throws:
InterruptedException
-
assertRecordsFromSnapshotAndStreamingArePresent
private void assertRecordsFromSnapshotAndStreamingArePresent(int expectedRecords) throws InterruptedException - Throws:
InterruptedException
-
assertRecordsWithValuesPresent
private void assertRecordsWithValuesPresent(int expectedRecords, List<Integer> expectedValues, String topicName) throws InterruptedException - Throws:
InterruptedException
-
insertRecords
- Throws:
SQLException
-
insertRecordsWithRandomSleep
private void insertRecordsWithRandomSleep(int rowCount, int startingPkId, int maxSleep, Runnable actionOnInsert) throws SQLException - Throws:
SQLException
-
insertRecordsWithRandomSleep
private void insertRecordsWithRandomSleep(int rowCount, int startingPkId, int maxSleep) throws SQLException - Throws:
SQLException
-