Package io.debezium.pipeline
Class AbstractBlockingSnapshotTest
java.lang.Object
io.debezium.embedded.AbstractConnectorTest
io.debezium.embedded.async.AbstractAsyncEngineConnectorTest
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, isEngineRunning, logger, logTestName, OFFSET_STORE_PATH, pollTimeoutInMs, skipTestRule -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidprotected voidassertRecordsFromSnapshotAndStreamingArePresent(int expectedRecords, AbstractConnectorTest.SourceRecords recordsByTopic) private voidassertRecordsWithValuesPresent(int expectedRecords, List<Integer> expectedValues, String topicName, AbstractConnectorTest.SourceRecords recordsByTopic) protected voidassertStreamingRecordsArePresent(int expectedRecords, AbstractConnectorTest.SourceRecords recordsByTopic) protected abstract Stringprotected abstract JdbcConnectionprivate Future<?>executeAsync(Runnable operation) voidvoidvoidprotected intgetExpectedValues(Long totalSnapshotRecords) private LonggetTotalSnapshotRecords(String table, String connector, String server, String task, String database) protected Configuration.BuilderhistorizedMutableConfig(boolean signalTableOnly, boolean storeOnlyCapturedDdl) protected intprotected 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) voidprotected abstract Stringserver()protected abstract Stringprotected abstract Stringprotected 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, 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.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
-
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
-
historizedMutableConfig
protected Configuration.Builder historizedMutableConfig(boolean signalTableOnly, boolean storeOnlyCapturedDdl) -
executeBlockingSnapshot
- Throws:
Exception
-
executeBlockingSnapshotWhileStreaming
- Throws:
Exception
-
executeBlockingSnapshotWithAdditionalCondition
- Throws:
Exception
-
readsSchemaOnlyForSignaledTables
- Throws:
Exception
-
expectedDdlsCount
protected int expectedDdlsCount() -
assertDdl
-
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
protected void assertStreamingRecordsArePresent(int expectedRecords, AbstractConnectorTest.SourceRecords recordsByTopic) -
assertRecordsFromSnapshotAndStreamingArePresent
protected void assertRecordsFromSnapshotAndStreamingArePresent(int expectedRecords, AbstractConnectorTest.SourceRecords recordsByTopic) throws InterruptedException - Throws:
InterruptedException
-
assertRecordsWithValuesPresent
private void assertRecordsWithValuesPresent(int expectedRecords, List<Integer> expectedValues, String topicName, AbstractConnectorTest.SourceRecords recordsByTopic) -
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
-