Package io.debezium.connector.sqlserver
Class SnapshotIT
- java.lang.Object
-
- io.debezium.embedded.AbstractConnectorTest
-
- io.debezium.connector.sqlserver.SnapshotIT
-
- All Implemented Interfaces:
Testing
public class SnapshotIT extends AbstractConnectorTest
Integration test for the Debezium SQL Server connector.- Author:
- Jiri Pechanec
-
-
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 private io.debezium.connector.sqlserver.SqlServerConnectionconnectionprivate static intINITIAL_RECORDS_PER_TABLEprivate static intSTREAMING_RECORDS_PER_TABLE-
Fields inherited from class io.debezium.embedded.AbstractConnectorTest
engine, logger, logTestName, OFFSET_STORE_PATH, pollTimeoutInMs, skipTestRule
-
-
Constructor Summary
Constructors Constructor Description SnapshotIT()
-
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, consumeRecordsByTopicUntil, consumeRecordsUntil, debug, getMaximumEnqueuedRecordCount, getSnapshotMetricsObjectName, getStreamingMetricsObjectName, getStreamingMetricsObjectName, getStreamingNamespace, initializeConnectorTestFramework, isStreamingRunning, isStreamingRunning, isTransactionRecord, loggingCompletion, print, readLastCommittedOffset, readLastCommittedOffsets, setConsumeTimeout, skipAvroValidation, start, start, start, start, start, startAndConsumeTillEnd, startAndConsumeTillEnd, stopConnector, stopConnector, validate, waitForAvailableRecords, waitForConnectorShutdown, waitForSnapshotToBeCompleted, waitForStreamingRunning, waitForStreamingRunning, waitTimeForRecords, waitTimeForRecordsAfterNulls
-
-
-
-
Field Detail
-
INITIAL_RECORDS_PER_TABLE
private static final int INITIAL_RECORDS_PER_TABLE
- See Also:
- Constant Field Values
-
STREAMING_RECORDS_PER_TABLE
private static final int STREAMING_RECORDS_PER_TABLE
- See Also:
- Constant Field Values
-
connection
private io.debezium.connector.sqlserver.SqlServerConnection connection
-
-
Method Detail
-
before
public void before() throws SQLException- Throws:
SQLException
-
after
public void after() throws SQLException- Throws:
SQLException
-
takeSnapshotInExclusiveMode
public void takeSnapshotInExclusiveMode() throws Exception- Throws:
Exception
-
takeSnapshotInSnapshotMode
public void takeSnapshotInSnapshotMode() throws Exception- Throws:
Exception
-
takeSnapshotInRepeatableReadMode
public void takeSnapshotInRepeatableReadMode() throws Exception- Throws:
Exception
-
takeSnapshotInReadCommittedMode
public void takeSnapshotInReadCommittedMode() throws Exception- Throws:
Exception
-
takeSnapshotInReadUncommittedMode
public void takeSnapshotInReadUncommittedMode() throws Exception- Throws:
Exception
-
takeSnapshot
private void takeSnapshot(io.debezium.connector.sqlserver.SqlServerConnectorConfig.SnapshotIsolationMode lockingMode) throws Exception- Throws:
Exception
-
takeSnapshotAndStartStreaming
public void takeSnapshotAndStartStreaming() throws Exception- Throws:
Exception
-
testDeadlockDetection
@FixFor("DBZ-1280") public void testDeadlockDetection() throws Exception
- Throws:
Exception
-
takeSnapshotWithOldStructAndStartStreaming
public void takeSnapshotWithOldStructAndStartStreaming() throws Exception- Throws:
Exception
-
testStreaming
private void testStreaming() throws SQLException, InterruptedException- Throws:
SQLExceptionInterruptedException
-
takeSchemaOnlySnapshotAndStartStreaming
public void takeSchemaOnlySnapshotAndStartStreaming() throws Exception- Throws:
Exception
-
takeSnapshotFromTableWithReservedName
@FixFor("DBZ-1031") public void takeSnapshotFromTableWithReservedName() throws Exception
- Throws:
Exception
-
takeSchemaOnlySnapshotAndSendHeartbeat
public void takeSchemaOnlySnapshotAndSendHeartbeat() throws Exception- Throws:
Exception
-
testBlacklistColumn
@FixFor("DBZ-1067") public void testBlacklistColumn() throws Exception
- Throws:
Exception
-
shouldSelectivelySnapshotTables
@FixFor("DBZ-2456") public void shouldSelectivelySnapshotTables() throws SQLException, InterruptedException
- Throws:
SQLExceptionInterruptedException
-
testColumnExcludeList
@FixFor("DBZ-1067") public void testColumnExcludeList() throws Exception
- Throws:
Exception
-
reoderCapturedTablesWithOverlappingTableWhitelist
public void reoderCapturedTablesWithOverlappingTableWhitelist() throws Exception- Throws:
Exception
-
reoderCapturedTablesWithoutTableWhitelist
public void reoderCapturedTablesWithoutTableWhitelist() throws Exception- Throws:
Exception
-
shouldOutputRecordsInCloudEventsFormat
@FixFor({"DBZ-1292","DBZ-3157"}) public void shouldOutputRecordsInCloudEventsFormat() throws Exception
- Throws:
Exception
-
assertRecord
private void assertRecord(org.apache.kafka.connect.data.Struct record, List<SchemaAndValueField> expected)
-
-