Package io.debezium.connector.mysql
Class ReadBinLogIT
- java.lang.Object
-
- io.debezium.connector.mysql.ReadBinLogIT
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static classReadBinLogIT.AnyValueprotected static classReadBinLogIT.EventQueuestatic classReadBinLogIT.Rowstatic classReadBinLogIT.RowBuilderprotected static classReadBinLogIT.TraceLifecycleListenerstatic interfaceReadBinLogIT.UpdateBuilder-
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 static SerializableANY_OBJECTprivate com.github.shyiko.mysql.binlog.BinaryLogClientclientprivate JdbcConfigurationconfigprivate MySqlTestConnectionconnprivate ReadBinLogIT.EventQueuecountersprivate UniqueDatabaseDATABASEprotected static longDEFAULT_TIMEOUTprivate List<com.github.shyiko.mysql.binlog.event.Event>eventsprotected static org.slf4j.LoggerLOGGERSkipTestRuleskipTest
-
Constructor Summary
Constructors Constructor Description ReadBinLogIT()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidafterEach()protected Serializableany()protected voidassertRow(Serializable[] data, Serializable... expected)protected voidassertRows(com.github.shyiko.mysql.binlog.event.DeleteRowsEventData eventData, ReadBinLogIT.RowBuilder rows)protected voidassertRows(com.github.shyiko.mysql.binlog.event.UpdateRowsEventData eventData, ReadBinLogIT.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, ReadBinLogIT.RowBuilder rows)voidbeforeEach()protected 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 ReadBinLogIT.RowBuilderrows()voidshouldCaptureMultipleWriteUpdateDeleteEvents()voidshouldCaptureMultipleWriteUpdateDeletesInSingleEvents()voidshouldCaptureQueryEventData()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.voidshouldCaptureSingleWriteUpdateDeleteEvents()voidshouldFailToConnectToInvalidBinlogFile()voidshouldQueryInformationSchema()voidshouldReadMultipleBinlogFiles()protected voidstartClient()protected voidstartClient(Consumer<com.github.shyiko.mysql.binlog.BinaryLogClient> preConnect)
-
-
-
Field Detail
-
LOGGER
protected static final org.slf4j.Logger LOGGER
-
DEFAULT_TIMEOUT
protected static final long DEFAULT_TIMEOUT
-
ANY_OBJECT
private static final Serializable ANY_OBJECT
-
counters
private ReadBinLogIT.EventQueue counters
-
client
private com.github.shyiko.mysql.binlog.BinaryLogClient client
-
conn
private MySqlTestConnection conn
-
events
private List<com.github.shyiko.mysql.binlog.event.Event> events
-
config
private JdbcConfiguration config
-
DATABASE
private final UniqueDatabase DATABASE
-
skipTest
public SkipTestRule skipTest
-
-
Method Detail
-
beforeEach
public void beforeEach() throws TimeoutException, IOException, SQLException, InterruptedException
-
afterEach
public void afterEach() throws IOException, SQLException- Throws:
IOExceptionSQLException
-
startClient
protected void startClient() throws IOException, TimeoutException, SQLException- Throws:
IOExceptionTimeoutExceptionSQLException
-
startClient
protected void startClient(Consumer<com.github.shyiko.mysql.binlog.BinaryLogClient> preConnect) throws IOException, TimeoutException, SQLException
- Throws:
IOExceptionTimeoutExceptionSQLException
-
shouldFailToConnectToInvalidBinlogFile
public void shouldFailToConnectToInvalidBinlogFile() throws Exception- Throws:
Exception
-
shouldReadMultipleBinlogFiles
public void shouldReadMultipleBinlogFiles() throws Exception- Throws:
Exception
-
shouldCaptureSingleWriteUpdateDeleteEvents
public void shouldCaptureSingleWriteUpdateDeleteEvents() throws Exception- Throws:
Exception
-
shouldCaptureMultipleWriteUpdateDeleteEvents
public void shouldCaptureMultipleWriteUpdateDeleteEvents() throws Exception- Throws:
Exception
-
shouldCaptureMultipleWriteUpdateDeletesInSingleEvents
public void shouldCaptureMultipleWriteUpdateDeletesInSingleEvents() throws Exception- Throws:
Exception
-
shouldCaptureQueryEventData
public void shouldCaptureQueryEventData() throws ExceptionTest 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
public void shouldQueryInformationSchema() throws Exception- 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
protected <T extends com.github.shyiko.mysql.binlog.event.EventData> List<T> recordedEventData(Class<T> eventType, int expectedCount)
-
assertRow
protected void assertRow(Serializable[] data, Serializable... expected)
-
assertRows
protected void assertRows(com.github.shyiko.mysql.binlog.event.WriteRowsEventData eventData, int numRowsInEvent, Serializable... expectedValuesInRows)
-
any
protected Serializable any()
-
rows
protected ReadBinLogIT.RowBuilder rows()
-
assertRows
protected void assertRows(com.github.shyiko.mysql.binlog.event.UpdateRowsEventData eventData, ReadBinLogIT.RowBuilder rows)
-
assertRows
protected void assertRows(com.github.shyiko.mysql.binlog.event.WriteRowsEventData eventData, ReadBinLogIT.RowBuilder rows)
-
assertRows
protected void assertRows(com.github.shyiko.mysql.binlog.event.DeleteRowsEventData eventData, ReadBinLogIT.RowBuilder rows)
-
-