public class MySqlConnectorIT extends AbstractConnectorTest
| Modifier and Type | Class and Description |
|---|---|
protected static class |
MySqlConnectorIT.BinlogPosition |
AbstractConnectorTest.SourceRecordsTesting.Debug, Testing.Files, Testing.InterruptableFunction, Testing.Network, Testing.Print, Testing.Timer| Modifier and Type | Field and Description |
|---|---|
private Configuration |
config |
private UniqueDatabase |
DATABASE |
private static Path |
DB_HISTORY_PATH |
private static int |
INITIAL_EVENT_COUNT |
private static int |
ORDERS_TABLE_EVENT_COUNT |
private static int |
PRODUCTS_TABLE_EVENT_COUNT |
private UniqueDatabase |
RO_DATABASE |
engine, logger, OFFSET_STORE_PATH, pollTimeoutInMs, skipTestRule| Constructor and Description |
|---|
MySqlConnectorIT() |
| Modifier and Type | Method and Description |
|---|---|
void |
afterEach() |
void |
beforeEach() |
private org.apache.kafka.connect.data.Struct |
getAfter(org.apache.kafka.connect.source.SourceRecord record) |
void |
parseDeleteQuery()
This test case validates that if you enable MySQL option binlog_rows_query_log_events, then
the original SQL statement for a DELETE over a single row is parsed into the resulting event.
|
void |
parseMultipleInsertStatements()
This test case validates that if you enable MySQL option binlog_rows_query_log_events, then
the issue multiple INSERTs, the appropriate SQL statements are parsed into the resulting events.
|
void |
parseMultipleRowInsertStatement()
This test case validates that if you enable MySQL option binlog_rows_query_log_events, then
the issue single multi-row INSERT, the appropriate SQL statements are parsed into the resulting events.
|
void |
parseMultiRowDeleteQuery()
This test case validates that if you enable MySQL option binlog_rows_query_log_events, then
issue a multi-row DELETE, the resulting events get the original SQL statement.
|
void |
parseMultiRowUpdateQuery()
This test case validates that if you enable MySQL option binlog_rows_query_log_events, then
the original SQL statement for an UPDATE over a single row is parsed into the resulting event.
|
void |
parseUpdateQuery()
This test case validates that if you enable MySQL option binlog_rows_query_log_events, then
the original SQL statement for an UPDATE over a single row is parsed into the resulting event.
|
private List<org.apache.kafka.connect.source.SourceRecord> |
recordsForTopicForRoProductsTable(AbstractConnectorTest.SourceRecords records) |
void |
shouldConsumeAllEventsFromDatabaseUsingSnapshot() |
void |
shouldConsumeEventsWithMaskedAndBlacklistedColumns() |
void |
shouldConsumeEventsWithNoSnapshot() |
void |
shouldEmitNoTombstoneOnDelete() |
void |
shouldEmitTombstoneOnDeleteByDefault() |
void |
shouldFailToValidateConflictingLockingModeConfiguration()
Validates that if you use the deprecated snapshot.minimal.locking configuration value
AND set its replacement snapshot.locking.mode an error will be generated.
|
void |
shouldFailToValidateConflictingLockingModeExtendedConfiguration()
Validates that if you use the deprecated snapshot.minimal.locking configuration value
AND set its replacement snapshot.locking.mode an error will be generated.
|
void |
shouldFailToValidateConflictingLockingModeNoneConfiguration()
Validates that if you use the deprecated snapshot.minimal.locking configuration value
AND set its replacement snapshot.locking.mode an error will be generated.
|
void |
shouldFailToValidateInvalidConfiguration() |
void |
shouldIgnoreAlterTableForNonCapturedTablesNotStoredInHistory() |
void |
shouldIgnoreAlterTableForNonCapturedTablesStoredInHistory() |
void |
shouldNotParseQueryIfConnectorNotConfiguredTo()
This test case validates that if you enable MySQL option binlog_rows_query_log_events,
but configure the connector to NOT include the query, it will not be included in the event.
|
void |
shouldNotParseQueryIfServerOptionDisabled()
This test case validates that if you disable MySQL option binlog_rows_query_log_events, then
the original SQL statement for an INSERT statement is NOT parsed into the resulting event.
|
void |
shouldNotStartWithInvalidConfiguration()
Verifies that the connector doesn't run with an invalid configuration.
|
void |
shouldParseQueryIfAvailableAndConnectorOptionEnabled()
This test case validates that if you enable MySQL option binlog_rows_query_log_events, then
the original SQL statement for an INSERT statement is parsed into the resulting event.
|
void |
shouldUseMultipleOverriddenSelectStatementsDuringSnapshotting() |
void |
shouldUseOverriddenSelectStatementDuringSnapshotting() |
void |
shouldValidateAcceptableConfiguration() |
void |
shouldValidateLockingModeNoneWithValidSnapshotModeConfiguration()
Validates that SNAPSHOT_LOCKING_MODE 'none' is valid with all snapshot modes
|
void |
shouldValidateLockingModeWithMinimalLocksEnabledConfiguration()
Validates that if you use the deprecated snapshot.minimal.locking configuration value is set to true
and its replacement snapshot.locking.mode is not explicitly defined, configuration validates as acceptable.
|
void |
shouldValidateLockingModeWithOutMinimalLocksEnabledConfiguration()
Validates that if you use the deprecated snapshot.minimal.locking configuration value is set to false
and its replacement snapshot.locking.mode is not explicitly defined, configuration validates as acceptable.
|
void |
shouldValidateValidConfigurationWithSSL() |
assertConfigurationErrors, assertConfigurationErrors, assertConfigurationErrors, assertConnectorIsRunning, assertConnectorNotRunning, assertDelete, assertEngineIsRunning, assertHasNoSourceQuery, assertInsert, assertKey, assertNoConfigurationErrors, assertNoRecordsToConsume, assertOffset, assertOffset, assertSchemaMatchesStruct, assertSchemaMatchesStruct, assertSourceQuery, assertTombstone, assertTombstone, assertUpdate, assertValueField, configValue, consumeAvailableRecords, consumeRecord, consumeRecords, consumeRecords, consumeRecordsByTopic, debug, getMaximumEnqueuedRecordCount, initializeConnectorTestFramework, loggingCompletion, print, readLastCommittedOffset, readLastCommittedOffsets, setConsumeTimeout, start, start, start, start, stopConnector, stopConnector, validate, waitForAvailableRecordsclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitdebug, once, once, print, print, printError, printError, printError, resetBeforeEachTest, time, timeprivate static final Path DB_HISTORY_PATH
private final UniqueDatabase DATABASE
private final UniqueDatabase RO_DATABASE
private static final int PRODUCTS_TABLE_EVENT_COUNT
private static final int ORDERS_TABLE_EVENT_COUNT
private static final int INITIAL_EVENT_COUNT
private Configuration config
public void beforeEach()
public void afterEach()
public void shouldNotStartWithInvalidConfiguration()
public void shouldFailToValidateInvalidConfiguration()
public void shouldValidateValidConfigurationWithSSL()
public void shouldValidateAcceptableConfiguration()
@FixFor(value="DBZ-602") public void shouldValidateLockingModeWithMinimalLocksEnabledConfiguration()
@FixFor(value="DBZ-602") public void shouldValidateLockingModeWithOutMinimalLocksEnabledConfiguration()
@FixFor(value="DBZ-602") public void shouldFailToValidateConflictingLockingModeConfiguration()
@FixFor(value="DBZ-602") public void shouldFailToValidateConflictingLockingModeExtendedConfiguration()
@FixFor(value="DBZ-602") public void shouldFailToValidateConflictingLockingModeNoneConfiguration()
@FixFor(value="DBZ-639") public void shouldValidateLockingModeNoneWithValidSnapshotModeConfiguration()
public void shouldConsumeAllEventsFromDatabaseUsingSnapshot()
throws SQLException,
InterruptedException
SQLExceptionInterruptedExceptionpublic void shouldUseOverriddenSelectStatementDuringSnapshotting()
throws SQLException,
InterruptedException
SQLExceptionInterruptedExceptionpublic void shouldUseMultipleOverriddenSelectStatementsDuringSnapshotting()
throws SQLException,
InterruptedException
SQLExceptionInterruptedException@FixFor(value="DBZ-977") public void shouldIgnoreAlterTableForNonCapturedTablesNotStoredInHistory() throws SQLException, InterruptedException
SQLExceptionInterruptedException@FixFor(value="DBZ-977") public void shouldIgnoreAlterTableForNonCapturedTablesStoredInHistory() throws SQLException, InterruptedException
SQLExceptionInterruptedExceptionprivate org.apache.kafka.connect.data.Struct getAfter(org.apache.kafka.connect.source.SourceRecord record)
public void shouldConsumeEventsWithNoSnapshot()
throws SQLException,
InterruptedException
SQLExceptionInterruptedExceptionpublic void shouldConsumeEventsWithMaskedAndBlacklistedColumns()
throws SQLException,
InterruptedException
SQLExceptionInterruptedException@FixFor(value="DBZ-582") public void shouldEmitTombstoneOnDeleteByDefault() throws Exception
Exception@FixFor(value="DBZ-582") public void shouldEmitNoTombstoneOnDelete() throws Exception
Exception@FixFor(value="DBZ-706") public void shouldNotParseQueryIfServerOptionDisabled() throws Exception
Exception@FixFor(value="DBZ-706") public void shouldNotParseQueryIfConnectorNotConfiguredTo() throws Exception
Exception@FixFor(value="DBZ-706") public void shouldParseQueryIfAvailableAndConnectorOptionEnabled() throws Exception
Exception@FixFor(value="DBZ-706") public void parseMultipleInsertStatements() throws Exception
Exception@FixFor(value="DBZ-706") public void parseMultipleRowInsertStatement() throws Exception
Exception@FixFor(value="DBZ-706") public void parseDeleteQuery() throws Exception
Exception@FixFor(value="DBZ-706") public void parseMultiRowDeleteQuery() throws Exception
Exception@FixFor(value="DBZ-706") public void parseUpdateQuery() throws Exception
Exception@FixFor(value="DBZ-706") public void parseMultiRowUpdateQuery() throws Exception
Exceptionprivate List<org.apache.kafka.connect.source.SourceRecord> recordsForTopicForRoProductsTable(AbstractConnectorTest.SourceRecords records)
Copyright © 2019 JBoss by Red Hat. All rights reserved.