Package io.debezium.connector.binlog
Class BinlogReadBinLogIT<C extends org.apache.kafka.connect.source.SourceConnector>
java.lang.Object
io.debezium.embedded.AbstractConnectorTest
io.debezium.embedded.async.AbstractAsyncEngineConnectorTest
io.debezium.connector.binlog.AbstractBinlogConnectorIT<C>
io.debezium.connector.binlog.BinlogReadBinLogIT<C>
- All Implemented Interfaces:
BinlogConnectorTest<C>,Testing
public abstract class BinlogReadBinLogIT<C extends org.apache.kafka.connect.source.SourceConnector>
extends AbstractBinlogConnectorIT<C>
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static final classprotected static classstatic classstatic classprotected static classstatic 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 TypeFieldDescriptionprivate static final Serializableprivate com.github.shyiko.mysql.binlog.BinaryLogClientprivate JdbcConfigurationprivate BinlogTestConnectionprivate BinlogReadBinLogIT.EventQueueprivate final UniqueDatabaseprotected static final longprivate List<com.github.shyiko.mysql.binlog.event.Event>protected static final org.slf4j.LoggerFields inherited from class io.debezium.embedded.AbstractConnectorTest
consumedLines, engine, isEngineRunning, logger, logTestName, OFFSET_STORE_PATH, pollTimeoutInMs, skipTestRule -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidprotected Serializableany()protected voidassertRow(Serializable[] data, Serializable... expected) protected voidassertRows(com.github.shyiko.mysql.binlog.event.DeleteRowsEventData eventData, BinlogReadBinLogIT.RowBuilder rows) protected voidassertRows(com.github.shyiko.mysql.binlog.event.UpdateRowsEventData eventData, BinlogReadBinLogIT.RowBuilder rows) protected voidassertRows(com.github.shyiko.mysql.binlog.event.WriteRowsEventData eventData, int numRowsInEvent, Serializable... expectedValuesInRows) protected voidassertRows(com.github.shyiko.mysql.binlog.event.WriteRowsEventData eventData, BinlogReadBinLogIT.RowBuilder rows) voidprotected voidlogConsumedEvent(com.github.shyiko.mysql.binlog.event.Event event) protected voidlogIgnoredEvent(com.github.shyiko.mysql.binlog.event.Event event) protected <T extends com.github.shyiko.mysql.binlog.event.EventData>
List<T>recordedEventData(Class<T> eventType, int expectedCount) protected voidrecordEvent(com.github.shyiko.mysql.binlog.event.Event event) protected BinlogReadBinLogIT.RowBuilderrows()voidvoidvoidTest case that is normally commented out since it is only useful to print out the DDL statements recorded by the binlog during a MySQL server initialization and startup.voidvoidvoidvoidprotected voidprotected voidstartClient(Consumer<com.github.shyiko.mysql.binlog.BinaryLogClient> preConnect) Methods inherited from class io.debezium.connector.binlog.AbstractBinlogConnectorIT
isMariaDb, isMySQL5, isPerconaServerMethods 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, 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, waitForAvailableRecords, waitForConnectorShutdown, waitForEngineShutdown, waitForSnapshotToBeCompleted, waitForSnapshotToBeCompleted, waitForSnapshotWithCustomMetricsToBeCompleted, waitForStreamingRunning, waitForStreamingRunning, waitForStreamingRunning, waitForStreamingWithCustomMetricsToStart, waitTimeForEngine, waitTimeForRecords, waitTimeForRecordsAfterNullsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.debezium.connector.binlog.BinlogConnectorTest
getConnectorClass, getConnectorName, getTestDatabaseConnection, getTestDatabaseConnection, getTestReplicaDatabaseConnection
-
Field Details
-
LOGGER
protected static final org.slf4j.Logger LOGGER -
DEFAULT_TIMEOUT
protected static final long DEFAULT_TIMEOUT -
ANY_OBJECT
-
counters
-
client
private com.github.shyiko.mysql.binlog.BinaryLogClient client -
conn
-
events
-
config
-
DATABASE
-
skipTest
-
-
Constructor Details
-
BinlogReadBinLogIT
public BinlogReadBinLogIT()
-
-
Method Details
-
beforeEach
-
afterEach
- Throws:
IOExceptionSQLException
-
startClient
- Throws:
IOExceptionTimeoutExceptionSQLException
-
startClient
protected void startClient(Consumer<com.github.shyiko.mysql.binlog.BinaryLogClient> preConnect) throws IOException, TimeoutException, SQLException - Throws:
IOExceptionTimeoutExceptionSQLException
-
shouldFailToConnectToInvalidBinlogFile
- Throws:
Exception
-
shouldReadMultipleBinlogFiles
- Throws:
Exception
-
shouldCaptureSingleWriteUpdateDeleteEvents
- Throws:
Exception
-
shouldCaptureMultipleWriteUpdateDeleteEvents
- Throws:
Exception
-
shouldCaptureMultipleWriteUpdateDeletesInSingleEvents
- Throws:
Exception
-
shouldCaptureQueryEventData
Test case that is normally commented out since it is only useful to print out the DDL statements recorded by the binlog during a MySQL server initialization and startup.- Throws:
Exception- if there are problems
-
shouldQueryInformationSchema
- Throws:
Exception
-
logConsumedEvent
protected void logConsumedEvent(com.github.shyiko.mysql.binlog.event.Event event) -
logIgnoredEvent
protected void logIgnoredEvent(com.github.shyiko.mysql.binlog.event.Event event) -
recordEvent
protected void recordEvent(com.github.shyiko.mysql.binlog.event.Event event) -
recordedEventData
-
assertRow
-
assertRows
protected void assertRows(com.github.shyiko.mysql.binlog.event.WriteRowsEventData eventData, int numRowsInEvent, Serializable... expectedValuesInRows) -
any
-
rows
-
assertRows
protected void assertRows(com.github.shyiko.mysql.binlog.event.UpdateRowsEventData eventData, BinlogReadBinLogIT.RowBuilder rows) -
assertRows
protected void assertRows(com.github.shyiko.mysql.binlog.event.WriteRowsEventData eventData, BinlogReadBinLogIT.RowBuilder rows) -
assertRows
protected void assertRows(com.github.shyiko.mysql.binlog.event.DeleteRowsEventData eventData, BinlogReadBinLogIT.RowBuilder rows)
-