Package io.debezium.connector.sqlserver
Class SqlServerConnectorIT
java.lang.Object
io.debezium.embedded.AbstractConnectorTest
io.debezium.connector.sqlserver.SqlServerConnectorIT
- All Implemented Interfaces:
Testing
Integration test for the Debezium SQL Server connector.
- Author:
- Jiri Pechanec
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class(package private) static interfaceNested 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 TypeFieldDescriptionorg.junit.rules.TestRuleprivate io.debezium.connector.sqlserver.SqlServerConnectionstatic final intFields inherited from class io.debezium.embedded.AbstractConnectorTest
consumedLines, engine, isEngineRunning, logger, logTestName, OFFSET_STORE_PATH, pollTimeoutInMs, skipTestRule -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidafter()private voidassertRecord(org.apache.kafka.connect.data.Struct record, List<SchemaAndValueField> expected) voidbefore()voidvoidvoidvoidvoidvoidvoidvoidvoidvoidprivate voidvoidvoidprivate voidrestartInTheMiddleOfTx(boolean restartJustAfterSnapshot, boolean afterStreaming) voidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidPassing the "applicationName" property which can be asserted from the connected sessions".voidvoidvoidvoidvoidprivate voidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidupdate()voidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidMethods 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, createEngine, createEngineBuilder, debug, getConsumer, getMaximumEnqueuedRecordCount, 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
-
conditionalFail
public org.junit.rules.TestRule conditionalFail -
ON_LINE
public static final int ON_LINE- See Also:
-
connection
private io.debezium.connector.sqlserver.SqlServerConnection connection
-
-
Constructor Details
-
SqlServerConnectorIT
public SqlServerConnectorIT()
-
-
Method Details
-
before
- Throws:
SQLException
-
after
- Throws:
SQLException
-
createAndDelete
- Throws:
Exception
-
createAndDeleteInDataQueryDirectMode
- Throws:
Exception
-
readOnlyApplicationIntent
- Throws:
Exception
-
timestampAndTimezone
- Throws:
Exception
-
deleteWithoutTombstone
- Throws:
Exception
-
update
- Throws:
Exception
-
updatePrimaryKey
- Throws:
Exception
-
updatePrimaryKeyWithRestartInMiddle
- Throws:
Exception
-
updatePrimaryKeyTwiceWithRestartInMiddleOfTx
- Throws:
Exception
-
streamChangesWhileStopped
- Throws:
Exception
-
verifyOffsets
- Throws:
Exception
-
testIncludeTable
- Throws:
Exception
-
shouldReportConfigurationErrorForUserNotHavingAccessToCDCTableInInitialMode
@FixFor("DBZ-4346") public void shouldReportConfigurationErrorForUserNotHavingAccessToCDCTableInInitialMode() throws Exception- Throws:
Exception
-
shouldNotReportConfigurationErrorForUserNotHavingAccessToCDCTableInInitialOnlyMode
@FixFor("DBZ-4346") public void shouldNotReportConfigurationErrorForUserNotHavingAccessToCDCTableInInitialOnlyMode() throws Exception- Throws:
Exception
-
testTableIncludeList
- Throws:
Exception
-
testTableExcludeList
- Throws:
Exception
-
blacklistColumnWhenCdcColumnsDoNotMatchWithOriginalSnapshot
@FixFor("DBZ-1617") public void blacklistColumnWhenCdcColumnsDoNotMatchWithOriginalSnapshot() throws Exception- Throws:
Exception
-
testColumnExcludeList
- Throws:
Exception
-
testColumnIncludeList
- Throws:
Exception
-
shouldHandleInvalidColumnFilter
- Throws:
Exception
-
shouldConsumeEventsWithMaskedHashedColumns
- Throws:
Exception
-
shouldConsumeEventsWithMaskedAndTruncatedColumns
- Throws:
Exception
-
whenCaptureInstanceExcludesColumnsExpectSnapshotAndStreamingToExcludeColumns
@FixFor("DBZ-2522") public void whenCaptureInstanceExcludesColumnsExpectSnapshotAndStreamingToExcludeColumns() throws Exception- Throws:
Exception
-
whenMultipleCaptureInstancesExcludesColumnsExpectLatestCDCTableUtilized
@FixFor("DBZ-2522") public void whenMultipleCaptureInstancesExcludesColumnsExpectLatestCDCTableUtilized() throws Exception- Throws:
Exception
-
whenCaptureInstanceExcludesColumnsAndColumnsRenamedExpectNoErrors
@FixFor("DBZ-2522") public void whenCaptureInstanceExcludesColumnsAndColumnsRenamedExpectNoErrors() throws Exception- Throws:
Exception
-
excludeColumnWhenCaptureInstanceExcludesColumns
- Throws:
Exception
-
excludeColumnWhenCaptureInstanceExcludesColumnInMiddleOfTable
@FixFor("DBZ-2522") public void excludeColumnWhenCaptureInstanceExcludesColumnInMiddleOfTable() throws Exception- Throws:
Exception
-
includeColumnsWhenCaptureInstanceExcludesColumnInMiddleOfTable
@FixFor("DBZ-2522") public void includeColumnsWhenCaptureInstanceExcludesColumnInMiddleOfTable() throws Exception- Throws:
Exception
-
excludeMultipleColumnsWhenCaptureInstanceExcludesSingleColumn
@FixFor("DBZ-2522") public void excludeMultipleColumnsWhenCaptureInstanceExcludesSingleColumn() throws Exception- Throws:
Exception
-
includeMultipleColumnsWhenCaptureInstanceExcludesSingleColumn
@FixFor("DBZ-2522") public void includeMultipleColumnsWhenCaptureInstanceExcludesSingleColumn() throws Exception- Throws:
Exception
-
shouldPropagateDatabaseDriverProperties
Passing the "applicationName" property which can be asserted from the connected sessions".- Throws:
Exception
-
restartInTheMiddleOfTx
private void restartInTheMiddleOfTx(boolean restartJustAfterSnapshot, boolean afterStreaming) throws Exception - Throws:
Exception
-
restartInTheMiddleOfTxAfterSnapshot
- Throws:
Exception
-
restartInTheMiddleOfTxAfterCompletedTx
- Throws:
Exception
-
restartInTheMiddleOfTx
- Throws:
Exception
-
testEmptySchemaWarningAfterApplyingFilters
- Throws:
Exception
-
testNoEmptySchemaWarningAfterApplyingFilters
- Throws:
Exception
-
keylessTable
- Throws:
Exception
-
shouldRewriteIdentityKey
@FixFor("DBZ-1015") public void shouldRewriteIdentityKey() throws InterruptedException, SQLException- Throws:
InterruptedExceptionSQLException
-
shouldCaptureTableSchema
@FixFor("DBZ-1491") public void shouldCaptureTableSchema() throws SQLException, InterruptedException- Throws:
SQLExceptionInterruptedException
-
shouldDetectPurgedHistory
- Throws:
Exception
-
useShortTableNamesForColumnMapper
- Throws:
Exception
-
useLongTableNamesForColumnMapper
- Throws:
Exception
-
useLongTableNamesForKeyMapper
- Throws:
Exception
-
useShortTableNamesForKeyMapper
- Throws:
Exception
-
shouldPropagateSourceTypeByDatatype
- Throws:
Exception
-
shouldNotStreamWhenUsingSnapshotModeInitialOnly
- Throws:
Exception
-
testMaxLsnSelectStatementWithoutLimit
- Throws:
Exception
-
testMaxLsnSelectStatementWithLimit
- Throws:
Exception
-
shouldEmitNoEventsForSkippedUpdateAndDeleteOperations
@FixFor("DBZ-2699") public void shouldEmitNoEventsForSkippedUpdateAndDeleteOperations() throws Exception- Throws:
Exception
-
shouldReturnSingleTaskConfig
public void shouldReturnSingleTaskConfig() -
shouldHandleMaxTasksGreaterThanNumberOfDatabaseNames
public void shouldHandleMaxTasksGreaterThanNumberOfDatabaseNames() -
shouldReturnTwoTaskConfigs
public void shouldReturnTwoTaskConfigs() -
shouldIncludeDatabaseNameIntoTopicAndSchemaNamesInMultiPartitionMode
@FixFor("DBZ-2975") public void shouldIncludeDatabaseNameIntoTopicAndSchemaNamesInMultiPartitionMode() throws Exception- Throws:
Exception
-
shouldApplySchemaFilters
- Throws:
Exception
-
shouldFailWhenUserDoesNotHaveAccessToDatabase
public void shouldFailWhenUserDoesNotHaveAccessToDatabase() -
shouldIgnoreNullOffsetsWhenRecoveringHistory
-
shouldStreamToOldTableAfterRename
- Throws:
Exception
-
shouldStreamToNewTableAfterRestart
- Throws:
Exception
-
shouldStopRetriableRestartsAtConfiguredMaximumDuringSnapshot
- Throws:
Exception
-
shouldStopRetriableRestartsAtConfiguredMaximumDuringStreaming
- Throws:
Exception
-
shouldNotUseOffsetWhenSnapshotIsAlways
- Throws:
Exception
-
shouldCreateSnapshotSchemaOnlyRecovery
- Throws:
Exception
-
shouldProcessPurgedLogsWhenDownAndSnapshotNeeded
public void shouldProcessPurgedLogsWhenDownAndSnapshotNeeded() throws SQLException, InterruptedException- Throws:
SQLExceptionInterruptedException
-
shouldAllowForCustomSnapshot
- Throws:
InterruptedExceptionSQLException
-
shouldCaptureTableSchemaForAllTablesIncludingNonCaptured
@FixFor("DBZ-7593") public void shouldCaptureTableSchemaForAllTablesIncludingNonCaptured() throws Exception- Throws:
Exception
-
shouldOnlyCaptureTableSchemaForIncluded
- Throws:
Exception
-
purgeDatabaseLogs
- Throws:
SQLException
-
shouldStopRetriableRestartsAtConfiguredMaximum
private void shouldStopRetriableRestartsAtConfiguredMaximum(SqlServerConnectorIT.SqlRunnable scenario) throws Exception - Throws:
Exception
-
databaseIsOnline
-
assertRecord
private void assertRecord(org.apache.kafka.connect.data.Struct record, List<SchemaAndValueField> expected)
-