Package io.debezium.connector.mysql
Class StreamingSourceIT
- java.lang.Object
-
- io.debezium.embedded.AbstractConnectorTest
-
- io.debezium.connector.mysql.StreamingSourceIT
-
- All Implemented Interfaces:
Testing
public class StreamingSourceIT extends AbstractConnectorTest
- Author:
- Randall Hauch, 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 Configurationconfigprivate UniqueDatabaseDATABASEprivate static PathDB_HISTORY_PATHprivate SchemaChangeHistoryschemaChangesprivate static StringSET_TLS_PROTOCOLSSkipTestRuleskipRuleprivate KeyValueStorestore-
Fields inherited from class io.debezium.embedded.AbstractConnectorTest
engine, logger, logTestName, OFFSET_STORE_PATH, pollTimeoutInMs, skipTestRule
-
-
Constructor Summary
Constructors Constructor Description StreamingSourceIT()
-
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, 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
-
DB_HISTORY_PATH
private static final Path DB_HISTORY_PATH
-
DATABASE
private final UniqueDatabase DATABASE
-
SET_TLS_PROTOCOLS
private static final String SET_TLS_PROTOCOLS
- See Also:
- Constant Field Values
-
config
private Configuration config
-
store
private KeyValueStore store
-
schemaChanges
private SchemaChangeHistory schemaChanges
-
skipRule
public SkipTestRule skipRule
-
-
Method Detail
-
beforeEach
public void beforeEach()
-
afterEach
public void afterEach()
-
consumeAtLeast
protected int consumeAtLeast(int minNumber) throws InterruptedException- Throws:
InterruptedException
-
consumeAtLeast
protected int consumeAtLeast(int minNumber, long timeout, TimeUnit unit) throws InterruptedException- Throws:
InterruptedException
-
filterAtLeast
protected long filterAtLeast(int minNumber, long timeout, TimeUnit unit) throws InterruptedException- Throws:
InterruptedException
-
getNumberOfEventsFiltered
private long getNumberOfEventsFiltered()
-
getNumberOfSkippedEvents
private long getNumberOfSkippedEvents()
-
simpleConfig
protected Configuration.Builder simpleConfig()
-
shouldCreateSnapshotOfSingleDatabase
public void shouldCreateSnapshotOfSingleDatabase() throws Exception- Throws:
Exception
-
shouldCreateSnapshotOfSingleDatabaseWithSchemaChanges
public void shouldCreateSnapshotOfSingleDatabaseWithSchemaChanges() throws Exception- Throws:
Exception
-
shouldFilterAllRecordsBasedOnDatabaseWhitelistFilter
@FixFor("DBZ-1206") public void shouldFilterAllRecordsBasedOnDatabaseWhitelistFilter() throws Exception
Setup a DATABASE_WHITELIST filter that filters all events. Verify all events are properly filtered. Verify numberOfFilteredEvents metric is incremented correctly.- Throws:
Exception
-
shouldFilterAllRecordsBasedOnDatabaseIncludeListFilter
@FixFor("DBZ-1206") public void shouldFilterAllRecordsBasedOnDatabaseIncludeListFilter() throws Exception
Setup a DATABASE_INCLUDE_LIST filter that filters all events. Verify all events are properly filtered. Verify numberOfFilteredEvents metric is incremented correctly.- Throws:
Exception
-
shouldHandleTimestampTimezones
@FixFor("DBZ-183") public void shouldHandleTimestampTimezones() throws Exception
- Throws:
Exception
-
shouldHandleMySQLTimeCorrectly
@FixFor("DBZ-342") public void shouldHandleMySQLTimeCorrectly() throws Exception
- Throws:
Exception
-
shouldFailOnSchemaInconsistency
public void shouldFailOnSchemaInconsistency() throws Exception- Throws:
Exception
-
shouldWarnOnSchemaInconsistency
public void shouldWarnOnSchemaInconsistency() throws Exception- Throws:
Exception
-
shouldIgnoreOnSchemaInconsistency
public void shouldIgnoreOnSchemaInconsistency() throws Exception- Throws:
Exception
-
shouldFailOnUnknownTlsProtocol
@FixFor("DBZ-1208") public void shouldFailOnUnknownTlsProtocol()
-
shouldAcceptTls12
@FixFor("DBZ-1208") public void shouldAcceptTls12() throws Exception
- Throws:
Exception
-
testHeartbeatActionQueryExecuted
@FixFor("DBZ-4029") public void testHeartbeatActionQueryExecuted() throws Exception
- Throws:
Exception
-
inconsistentSchema
private void inconsistentSchema(CommonConnectorConfig.EventProcessingFailureHandlingMode mode) throws InterruptedException, SQLException
- Throws:
InterruptedExceptionSQLException
-
productsTableName
private String productsTableName() throws SQLException
- Throws:
SQLException
-
-