public class AbstractMySqlConnectorOutputTest extends ConnectorOutputTest
MySqlConnector in various configurations and against different MySQL server instances
and verify the output is as expected.ConnectorOutputTest.InputStreamSupplier, ConnectorOutputTest.OutputStreamSupplier, ConnectorOutputTest.TestData, ConnectorOutputTest.TestSpecification, ConnectorOutputTest.VariableSupplier| Modifier and Type | Field and Description |
|---|---|
private org.slf4j.Logger |
logger |
CONNECTOR_OUTPUT_PATH, CONTROL_END, CONTROL_KEY, CONTROL_RESTART, CONTROL_STOP, DEFAULT_CONNECTOR_PROPERTIES_FILENAME, DEFAULT_ENV_PROPERTIES_FILENAME, DEFAULT_EXPECTED_RECORDS_FILENAME, ENV_CONNECTOR_TIMEOUT_IN_SECONDS, ENV_IGNORE_FIELDS, OFFSET_STORE_PATH| Constructor and Description |
|---|
AbstractMySqlConnectorOutputTest() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addValueComparatorsByFieldPath(BiConsumer<String,VerifyRecord.RecordValueComparator> comparatorsByPath) |
protected void |
assertSameGtidSet(String pathToField,
Object actual,
Object expected) |
protected String[] |
globallyIgnorableFieldNames() |
private static io.debezium.connector.mysql.GtidSet |
readAvailableGtidSet(Configuration config) |
protected Map<String,String> |
readSystemVariables(Configuration config)
Read the system variables and master status using the given connector configuration.
|
protected static void |
waitForGtidSetsToMatch(Configuration master,
Configuration replica)
Wait up to 10 seconds until the replica catches up with the master.
|
protected static void |
waitForGtidSetsToMatch(Configuration master,
Configuration replica,
long timeout,
TimeUnit unit)
Wait a maximum amount of time until the replica catches up with the master.
|
addValueComparatorsBySchemaName, afterEachTestMethod, cleanOffsetStorage, replaceVariables, runConnector, runConnector, runConnector, runConnector, runConnector, runConnector, usingSpec, usingSpec, usingSpec, usingSpec, usingSpecprivate static io.debezium.connector.mysql.GtidSet readAvailableGtidSet(Configuration config)
protected static void waitForGtidSetsToMatch(Configuration master, Configuration replica)
master - the configuration with the MySqlConnectorConfig.HOSTNAME and MySqlConnectorConfig.PORT
configuration properties for the MySQL master; may not be nullreplica - the configuration with the MySqlConnectorConfig.HOSTNAME and MySqlConnectorConfig.PORT
configuration properties for the MySQL replica; may not be nullwaitForGtidSetsToMatch(Configuration, Configuration, long, TimeUnit)protected static void waitForGtidSetsToMatch(Configuration master, Configuration replica, long timeout, TimeUnit unit)
master - the configuration with the MySqlConnectorConfig.HOSTNAME and MySqlConnectorConfig.PORT
configuration properties for the MySQL master; may not be nullreplica - the configuration with the MySqlConnectorConfig.HOSTNAME and MySqlConnectorConfig.PORT
configuration properties for the MySQL replica; may not be nulltimeout - the maximum amount of time to waitunit - the time unit for the timeoutwaitForGtidSetsToMatch(Configuration, Configuration)protected Map<String,String> readSystemVariables(Configuration config) throws Exception
ConnectorOutputTest.TestSpecification instances
with variables.
When connected to a replica, the GTID source for the master is added to the variables using the "@{code master_uuid}"
variable, which does not correspond to a real MySQL system variable. The GTID source of the server to which the test
case connects is given by the "server_uuid" system variable.
config - the connector configuration; never nullException - if there is a problem connecting to the database and reading the system variablesprotected String[] globallyIgnorableFieldNames()
globallyIgnorableFieldNames in class ConnectorOutputTestprotected void addValueComparatorsByFieldPath(BiConsumer<String,VerifyRecord.RecordValueComparator> comparatorsByPath)
addValueComparatorsByFieldPath in class ConnectorOutputTestCopyright © 2019 JBoss by Red Hat. All rights reserved.