Package io.debezium.connector.oracle
Class AbstractOracleDatatypesTest
- java.lang.Object
-
- io.debezium.embedded.AbstractConnectorTest
-
- io.debezium.connector.oracle.AbstractOracleDatatypesTest
-
- All Implemented Interfaces:
Testing
- Direct Known Subclasses:
SnapshotDatatypesIT,StreamingDatatypesIT
public abstract class AbstractOracleDatatypesTest extends AbstractConnectorTest
Integration test to verify different Oracle datatypes.- Author:
- Jiri Pechanec
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class io.debezium.embedded.AbstractConnectorTest
AbstractConnectorTest.SourceRecords
-
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 String[]ALL_DDLSprivate static String[]ALL_TABLESprivate static StringCLOB_JSONprivate static io.debezium.connector.oracle.OracleConnectionconnectionprivate static StringDDL_CLOBprivate static StringDDL_FPprivate static StringDDL_INTprivate static StringDDL_STRINGprivate static StringDDL_TIMEprivate static List<SchemaAndValueField>EXPECTED_CLOBprivate static List<SchemaAndValueField>EXPECTED_CLOB_UPDATEprivate static List<SchemaAndValueField>EXPECTED_FPprivate static List<SchemaAndValueField>EXPECTED_FP_AS_DOUBLEprivate static List<SchemaAndValueField>EXPECTED_FP_AS_STRINGprivate static List<SchemaAndValueField>EXPECTED_INTprivate static List<SchemaAndValueField>EXPECTED_STRINGprivate static List<SchemaAndValueField>EXPECTED_TIMEprivate static List<SchemaAndValueField>EXPECTED_TIME_AS_CONNECTprivate static StringNCLOB_JSONprivate static org.apache.kafka.connect.data.SchemaNUMBER_SCHEMA(package private) static StringPRECISION_PARAMETER_KEYKey for schema parameter used to store DECIMAL/NUMERIC columns' precision.org.junit.rules.TestRuleskipAdapterRule-
Fields inherited from class io.debezium.embedded.AbstractConnectorTest
engine, logger, logTestName, OFFSET_STORE_PATH, pollTimeoutInMs, skipTestRule
-
-
Constructor Summary
Constructors Constructor Description AbstractOracleDatatypesTest()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description private voidassertRecord(org.apache.kafka.connect.data.Struct record, List<SchemaAndValueField> expected)static voidbeforeClass()voidclobTypes()static voidcloseConnection()protected abstract Configuration.BuilderconnectorConfig()protected static voidcreateTables()static voiddropTables()voidfpTypes()voidfpTypesAsDouble()voidfpTypesAsString()protected List<String>getAllTables()protected abstract voidinit(TemporalPrecisionMode temporalPrecisionMode)protected static voidinsertClobTypes()protected static voidinsertFpTypes()protected static voidinsertIntTypes()protected abstract booleaninsertRecordsDuringTest()protected static voidinsertStringTypes()protected static voidinsertTimeTypes()voidintTypes()private static Stringpart(String text, int start, int length)voidstringTypes()voidtimeTypes()voidtimeTypesAsAdaptiveMicroseconds()voidtimeTypesAsConnect()protected static voidupdateClobTypes()-
Methods 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, consumeDmlRecordsByTopic, consumeDmlRecordsByTopic, consumeDmlRecordsByTopic, consumeRecord, consumeRecords, consumeRecords, consumeRecords, consumeRecordsByTopic, consumeRecordsByTopic, consumeRecordsByTopic, debug, getMaximumEnqueuedRecordCount, getSnapshotMetricsObjectName, getStreamingMetricsObjectName, getStreamingMetricsObjectName, getStreamingNamespace, initializeConnectorTestFramework, isStreamingRunning, isStreamingRunning, isTransactionRecord, loggingCompletion, print, readLastCommittedOffset, readLastCommittedOffsets, setConsumeTimeout, skipAvroValidation, start, start, start, start, start, startAndConsumeTillEnd, stopConnector, stopConnector, validate, waitForAvailableRecords, waitForConnectorShutdown, waitForSnapshotToBeCompleted, waitForStreamingRunning, waitForStreamingRunning, waitTimeForRecords, waitTimeForRecordsAfterNulls
-
-
-
-
Field Detail
-
PRECISION_PARAMETER_KEY
static final String PRECISION_PARAMETER_KEY
Key for schema parameter used to store DECIMAL/NUMERIC columns' precision.- See Also:
- Constant Field Values
-
NUMBER_SCHEMA
private static final org.apache.kafka.connect.data.Schema NUMBER_SCHEMA
-
DDL_STRING
private static final String DDL_STRING
- See Also:
- Constant Field Values
-
DDL_FP
private static final String DDL_FP
- See Also:
- Constant Field Values
-
DDL_INT
private static final String DDL_INT
- See Also:
- Constant Field Values
-
DDL_TIME
private static final String DDL_TIME
- See Also:
- Constant Field Values
-
DDL_CLOB
private static final String DDL_CLOB
- See Also:
- Constant Field Values
-
EXPECTED_STRING
private static final List<SchemaAndValueField> EXPECTED_STRING
-
EXPECTED_FP
private static final List<SchemaAndValueField> EXPECTED_FP
-
EXPECTED_FP_AS_STRING
private static final List<SchemaAndValueField> EXPECTED_FP_AS_STRING
-
EXPECTED_FP_AS_DOUBLE
private static final List<SchemaAndValueField> EXPECTED_FP_AS_DOUBLE
-
EXPECTED_INT
private static final List<SchemaAndValueField> EXPECTED_INT
-
EXPECTED_TIME
private static final List<SchemaAndValueField> EXPECTED_TIME
-
EXPECTED_TIME_AS_CONNECT
private static final List<SchemaAndValueField> EXPECTED_TIME_AS_CONNECT
-
CLOB_JSON
private static final String CLOB_JSON
-
NCLOB_JSON
private static final String NCLOB_JSON
-
EXPECTED_CLOB
private static final List<SchemaAndValueField> EXPECTED_CLOB
-
EXPECTED_CLOB_UPDATE
private static final List<SchemaAndValueField> EXPECTED_CLOB_UPDATE
-
ALL_TABLES
private static final String[] ALL_TABLES
-
ALL_DDLS
private static final String[] ALL_DDLS
-
skipAdapterRule
public final org.junit.rules.TestRule skipAdapterRule
-
connection
private static io.debezium.connector.oracle.OracleConnection connection
-
-
Method Detail
-
beforeClass
public static void beforeClass() throws SQLException- Throws:
SQLException
-
dropTables
public static void dropTables() throws SQLException- Throws:
SQLException
-
createTables
protected static void createTables() throws SQLException- Throws:
SQLException
-
insertRecordsDuringTest
protected abstract boolean insertRecordsDuringTest()
-
connectorConfig
protected abstract Configuration.Builder connectorConfig()
-
init
protected abstract void init(TemporalPrecisionMode temporalPrecisionMode) throws Exception
- Throws:
Exception
-
closeConnection
public static void closeConnection() throws SQLException- Throws:
SQLException
-
fpTypesAsString
@FixFor("DBZ-1552") public void fpTypesAsString() throws Exception
- Throws:
Exception
-
fpTypesAsDouble
@FixFor("DBZ-1552") public void fpTypesAsDouble() throws Exception
- Throws:
Exception
-
timeTypesAsAdaptiveMicroseconds
@FixFor("DBZ-3268") public void timeTypesAsAdaptiveMicroseconds() throws Exception
- Throws:
Exception
-
timeTypesAsConnect
@FixFor("DBZ-3268") public void timeTypesAsConnect() throws Exception
- Throws:
Exception
-
insertStringTypes
protected static void insertStringTypes() throws SQLException- Throws:
SQLException
-
insertFpTypes
protected static void insertFpTypes() throws SQLException- Throws:
SQLException
-
insertIntTypes
protected static void insertIntTypes() throws SQLException- Throws:
SQLException
-
insertTimeTypes
protected static void insertTimeTypes() throws SQLException- Throws:
SQLException
-
insertClobTypes
protected static void insertClobTypes() throws SQLException- Throws:
SQLException
-
assertRecord
private void assertRecord(org.apache.kafka.connect.data.Struct record, List<SchemaAndValueField> expected)
-
-