public class TestHelper extends Object
| Modifier and Type | Field and Description |
|---|---|
static Path |
DB_HISTORY_PATH |
private static String |
DISABLE_DB_CDC |
private static String |
DISABLE_TABLE_CDC |
private static String |
ENABLE_DB_CDC |
private static String |
ENABLE_TABLE_CDC |
private static org.slf4j.Logger |
LOGGER |
private static String |
RESTART_ASN_CDC |
private static String |
STATEMENTS_PLACEHOLDER |
private static String |
STATUS_DB_CDC |
static String |
TEST_DATABASE |
static String |
TYPE_LENGTH_PARAMETER_KEY
Key for schema parameter used to store a source column's type length.
|
static String |
TYPE_NAME_PARAMETER_KEY
Key for schema parameter used to store a source column's type name.
|
static String |
TYPE_SCALE_PARAMETER_KEY
Key for schema parameter used to store a source column's type scale.
|
static int |
WAIT_FOR_CDC |
| Constructor and Description |
|---|
TestHelper() |
| Modifier and Type | Method and Description |
|---|---|
static io.debezium.connector.db2.Db2Connection |
adminConnection() |
static io.debezium.jdbc.JdbcConfiguration |
adminJdbcConfig() |
static io.debezium.config.Configuration.Builder |
defaultConfig()
Returns a default configuration suitable for most test cases.
|
static io.debezium.jdbc.JdbcConfiguration |
defaultJdbcConfig() |
static void |
disableDbCdc(io.debezium.connector.db2.Db2Connection connection)
Disables CDC for a given database, if not already disabled.
|
static void |
disableTableCdc(io.debezium.connector.db2.Db2Connection connection,
String name)
Disables CDC for a table for which it was enabled before.
|
static void |
enableDbCdc(io.debezium.connector.db2.Db2Connection connection)
Enables CDC for a given database, if not already enabled.
|
static void |
enableTableCdc(io.debezium.connector.db2.Db2Connection connection,
String name)
Enables CDC for a table if not already enabled and generates the wrapper
functions for that table.
|
static void |
refreshAndWait(io.debezium.connector.db2.Db2Connection connection) |
static io.debezium.connector.db2.Db2Connection |
testConnection() |
static void |
waitForCDC() |
static void |
waitForSnapshotToBeCompleted() |
private static final org.slf4j.Logger LOGGER
public static final Path DB_HISTORY_PATH
public static final String TEST_DATABASE
public static final int WAIT_FOR_CDC
public static final String TYPE_NAME_PARAMETER_KEY
public static final String TYPE_LENGTH_PARAMETER_KEY
public static final String TYPE_SCALE_PARAMETER_KEY
private static final String STATEMENTS_PLACEHOLDER
private static final String ENABLE_DB_CDC
private static final String DISABLE_DB_CDC
private static final String STATUS_DB_CDC
private static final String ENABLE_TABLE_CDC
private static final String DISABLE_TABLE_CDC
private static final String RESTART_ASN_CDC
public static io.debezium.jdbc.JdbcConfiguration adminJdbcConfig()
public static io.debezium.jdbc.JdbcConfiguration defaultJdbcConfig()
public static io.debezium.config.Configuration.Builder defaultConfig()
public static io.debezium.connector.db2.Db2Connection adminConnection()
public static io.debezium.connector.db2.Db2Connection testConnection()
public static void enableDbCdc(io.debezium.connector.db2.Db2Connection connection)
throws SQLException
SQLException - if anything unexpected failspublic static void disableDbCdc(io.debezium.connector.db2.Db2Connection connection)
throws SQLException
SQLException - if anything unexpected failspublic static void enableTableCdc(io.debezium.connector.db2.Db2Connection connection,
String name)
throws SQLException
name - the name of the table, may not be nullSQLException - if anything unexpected failspublic static void disableTableCdc(io.debezium.connector.db2.Db2Connection connection,
String name)
throws SQLException
name - the name of the table, may not be nullSQLException - if anything unexpected failspublic static void waitForSnapshotToBeCompleted()
throws InterruptedException
InterruptedExceptionpublic static void refreshAndWait(io.debezium.connector.db2.Db2Connection connection)
throws SQLException
SQLExceptionpublic static void waitForCDC()
Copyright © 2020 JBoss by Red Hat. All rights reserved.