Package io.debezium.connector.oracle
Class OracleConnectorIT
- java.lang.Object
-
- io.debezium.embedded.AbstractConnectorTest
-
- io.debezium.connector.oracle.OracleConnectorIT
-
- All Implemented Interfaces:
Testing
public class OracleConnectorIT extends AbstractConnectorTest
Integration test for the Debezium Oracle connector.- Author:
- Gunnar Morling
-
-
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 io.debezium.connector.oracle.OracleConnectionconnectionprivate static longMICROS_PER_SECONDorg.junit.rules.TestRuleskipAdapterRuleorg.junit.rules.TestRuleskipOptionRuleprivate static StringSNAPSHOT_COMPLETED_KEY-
Fields inherited from class io.debezium.embedded.AbstractConnectorTest
engine, logger, logTestName, OFFSET_STORE_PATH, pollTimeoutInMs, skipTestRule
-
-
Constructor Summary
Constructors Constructor Description OracleConnectorIT()
-
Method Summary
-
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, startAndConsumeTillEnd, stopConnector, stopConnector, validate, waitForAvailableRecords, waitForConnectorShutdown, waitForSnapshotToBeCompleted, waitForStreamingRunning, waitForStreamingRunning, waitTimeForRecords, waitTimeForRecordsAfterNulls
-
-
-
-
Field Detail
-
MICROS_PER_SECOND
private static final long MICROS_PER_SECOND
-
SNAPSHOT_COMPLETED_KEY
private static final String SNAPSHOT_COMPLETED_KEY
- See Also:
- Constant Field Values
-
skipAdapterRule
public final org.junit.rules.TestRule skipAdapterRule
-
skipOptionRule
public final org.junit.rules.TestRule skipOptionRule
-
connection
private static io.debezium.connector.oracle.OracleConnection connection
-
-
Method Detail
-
beforeClass
public static void beforeClass() throws SQLException- Throws:
SQLException
-
closeConnection
public static void closeConnection() throws SQLException- Throws:
SQLException
-
before
public void before() throws SQLException- Throws:
SQLException
-
shouldSnapshotAndStreamWithHyphenedTableName
@FixFor("DBZ-2452") public void shouldSnapshotAndStreamWithHyphenedTableName() throws Exception
- Throws:
Exception
-
shouldContinueWithStreamingAfterSnapshot
public void shouldContinueWithStreamingAfterSnapshot() throws Exception- Throws:
Exception
-
continueStreamingAfterSnapshot
private void continueStreamingAfterSnapshot(Configuration config) throws Exception
- Throws:
Exception
-
shouldStreamTransaction
@FixFor("DBZ-1223") public void shouldStreamTransaction() throws Exception
- Throws:
Exception
-
sendTxBatch
private void sendTxBatch(Configuration config, int expectedRecordCount, int offset) throws SQLException, InterruptedException
- Throws:
SQLExceptionInterruptedException
-
assertTxBatch
private void assertTxBatch(Configuration config, int expectedRecordCount, int offset) throws InterruptedException
- Throws:
InterruptedException
-
shouldStreamAfterRestartAfterSnapshot
public void shouldStreamAfterRestartAfterSnapshot() throws Exception- Throws:
Exception
-
shouldReadChangeStreamForExistingTable
public void shouldReadChangeStreamForExistingTable() throws Exception- Throws:
Exception
-
deleteWithoutTombstone
@FixFor("DBZ-835") public void deleteWithoutTombstone() throws Exception
- Throws:
Exception
-
shouldReadChangeStreamForTableCreatedWhileStreaming
public void shouldReadChangeStreamForTableCreatedWhileStreaming() throws Exception- Throws:
Exception
-
shouldReceiveHeartbeatAlsoWhenChangingTableIncludeListTables
@FixFor("DBZ-800") public void shouldReceiveHeartbeatAlsoWhenChangingTableIncludeListTables() throws Exception
- Throws:
Exception
-
shouldConsumeEventsWithMaskedAndTruncatedColumnsWithDatabaseName
@FixFor("DBZ-775") public void shouldConsumeEventsWithMaskedAndTruncatedColumnsWithDatabaseName() throws Exception
- Throws:
Exception
-
shouldConsumeEventsWithMaskedAndTruncatedColumnsWithoutDatabaseName
@FixFor("DBZ-775") public void shouldConsumeEventsWithMaskedAndTruncatedColumnsWithoutDatabaseName() throws Exception
- Throws:
Exception
-
shouldConsumeEventsWithMaskedAndTruncatedColumns
public void shouldConsumeEventsWithMaskedAndTruncatedColumns(boolean useDatabaseName) throws Exception- Throws:
Exception
-
shouldRewriteIdentityKeyWithDatabaseName
@FixFor("DBZ-775") public void shouldRewriteIdentityKeyWithDatabaseName() throws Exception
- Throws:
Exception
-
shouldRewriteIdentityKeyWithoutDatabaseName
@FixFor("DBZ-775") public void shouldRewriteIdentityKeyWithoutDatabaseName() throws Exception
- Throws:
Exception
-
shouldRewriteIdentityKey
private void shouldRewriteIdentityKey(boolean useDatabaseName) throws Exception- Throws:
Exception
-
shouldPropagateSourceTypeByDatatype
@FixFor({"DBZ-1916","DBZ-1830"}) public void shouldPropagateSourceTypeByDatatype() throws Exception
- Throws:
Exception
-
shouldNotTruncateWhenSkipped
@FixFor("DBZ-4385") public void shouldNotTruncateWhenSkipped() throws Exception
- Throws:
Exception
-
shouldHandleIntervalTypesAsInt64
@FixFor("DBZ-1539") public void shouldHandleIntervalTypesAsInt64() throws Exception
- Throws:
Exception
-
shouldHandleIntervalTypesAsString
@FixFor("DBZ-1539") public void shouldHandleIntervalTypesAsString() throws Exception
- Throws:
Exception
-
shouldSnapshotAndStreamChangesFromTableWithNumericDefaultValues
@FixFor("DBZ-2624") public void shouldSnapshotAndStreamChangesFromTableWithNumericDefaultValues() throws Exception
- Throws:
Exception
-
shouldSnapshotAndStreamChangesFromPartitionedTable
@FixFor("DBZ-2683") public void shouldSnapshotAndStreamChangesFromPartitionedTable() throws Exception
- Throws:
Exception
-
shouldAvroSerializeColumnsWithSpecialCharacters
@FixFor("DBZ-2849") public void shouldAvroSerializeColumnsWithSpecialCharacters() throws Exception
- Throws:
Exception
-
testArchiveLogScnBoundariesAreIncluded
@FixFor("DBZ-2825") public void testArchiveLogScnBoundariesAreIncluded() throws Exception
- Throws:
Exception
-
shouldConvertDatesSpecifiedAsStringInSQL
@FixFor("DBZ-2784") public void shouldConvertDatesSpecifiedAsStringInSQL() throws Exception
- Throws:
Exception
-
shouldConvertNumericAsStringDecimalHandlingMode
@FixFor("DBZ-2733") public void shouldConvertNumericAsStringDecimalHandlingMode() throws Exception
- Throws:
Exception
-
assertRecordSchemaAndValues
protected void assertRecordSchemaAndValues(List<SchemaAndValueField> expectedByColumn, org.apache.kafka.connect.source.SourceRecord record, String envelopeFieldName)
-
shouldStreamDdlThatExceeds4000
@FixFor("DBZ-2920") public void shouldStreamDdlThatExceeds4000() throws Exception
- Throws:
Exception
-
shouldNotObserveDeadlockWhileStreamingWithXstream
@FixFor("DBZ-2891") public void shouldNotObserveDeadlockWhileStreamingWithXstream() throws Exception
- Throws:
Exception
-
shouldReadTableUniqueIndicesWithCharactersThatRequireExplicitQuotes
@FixFor("DBZ-3057") public void shouldReadTableUniqueIndicesWithCharactersThatRequireExplicitQuotes() throws Exception
- Throws:
Exception
-
testSnapshotCompletesWithSystemGeneratedUniqueIndexOnKeylessTable
@FixFor("DBZ-3151") public void testSnapshotCompletesWithSystemGeneratedUniqueIndexOnKeylessTable() throws Exception
- Throws:
Exception
-
shouldGetOracleDatabaseVersion
@FixFor("DBZ-3001") public void shouldGetOracleDatabaseVersion() throws Exception
- Throws:
Exception
-
shouldStreamChangesForTableWithMultipleLogGroupTypes
@FixFor("DBZ-3109") public void shouldStreamChangesForTableWithMultipleLogGroupTypes() throws Exception
- Throws:
Exception
-
shouldResumeStreamingAtCorrectScnOffset
@FixFor("DBZ-2875") public void shouldResumeStreamingAtCorrectScnOffset() throws Exception
- Throws:
Exception
-
shouldHandleParentChildIndexOrganizedTables
@FixFor("DBZ-3036") public void shouldHandleParentChildIndexOrganizedTables() throws Exception
- Throws:
Exception
-
shouldSnapshotAndStreamClobDataTypes
@FixFor("DBZ-3257") public void shouldSnapshotAndStreamClobDataTypes() throws Exception
- Throws:
Exception
-
shouldContainPartitionInSchemaChangeEvent
@FixFor("DBZ-3347") public void shouldContainPartitionInSchemaChangeEvent() throws Exception
- Throws:
Exception
-
shouldSnapshotAndStreamTablesWithNoPrimaryKey
@FixFor("DBZ-832") public void shouldSnapshotAndStreamTablesWithNoPrimaryKey() throws Exception
- Throws:
Exception
-
shouldSnapshotAndStreamTablesWithUniqueIndexPrimaryKey
@FixFor("DBZ-1211") public void shouldSnapshotAndStreamTablesWithUniqueIndexPrimaryKey() throws Exception
- Throws:
Exception
-
shouldNotEmitEventsOnConstraintViolations
@FixFor("DBZ-3322") public void shouldNotEmitEventsOnConstraintViolations() throws Exception
- Throws:
Exception
-
shouldNotEmitEventsInRollbackTransaction
@FixFor("DBZ-3322") public void shouldNotEmitEventsInRollbackTransaction() throws Exception
- Throws:
Exception
-
shouldSelectivelySnapshotTables
@FixFor("DBZ-3062") public void shouldSelectivelySnapshotTables() throws Exception
- Throws:
Exception
-
shouldNotLogWarningsAboutCommittedTransactionsWhileStreamingNormally
@FixFor("DBZ-3616") public void shouldNotLogWarningsAboutCommittedTransactionsWhileStreamingNormally() throws Exception
- Throws:
Exception
-
shouldOutputRecordsInCloudEventsFormat
@FixFor("DBZ-3668") public void shouldOutputRecordsInCloudEventsFormat() throws Exception
- Throws:
Exception
-
shouldCaptureTableMetadataWithMultipleStatements
@FixFor("DBZ-3896") public void shouldCaptureTableMetadataWithMultipleStatements() throws Exception
- Throws:
Exception
-
shouldIgnoreAllTablesInExcludedSchemas
@FixFor("DBZ-3898") public void shouldIgnoreAllTablesInExcludedSchemas() throws Exception
- Throws:
Exception
-
shouldStartWithArchiveLogOnlyModeAndStreamWhenRecordsBecomeAvailable
@FixFor("DBZ-3712") public void shouldStartWithArchiveLogOnlyModeAndStreamWhenRecordsBecomeAvailable() throws Exception
- Throws:
Exception
-
shouldPermitChangingToArchiveLogOnlyModeOnExistingConnector
@FixFor("DBZ-3712") public void shouldPermitChangingToArchiveLogOnlyModeOnExistingConnector() throws Exception
- Throws:
Exception
-
waitForLogSwitchOrForceOneAfterTimeout
private void waitForLogSwitchOrForceOneAfterTimeout() throws SQLException- Throws:
SQLException
-
shouldFilterUser
@FixFor("DBZ-3978") public void shouldFilterUser() throws Exception
- Throws:
Exception
-
getStreamingMetric
private <T> T getStreamingMetric(String metricName) throws JMException
- Throws:
JMException
-
generateAlphaNumericStringColumn
private String generateAlphaNumericStringColumn(int size)
-
verifyHeartbeatRecord
private void verifyHeartbeatRecord(org.apache.kafka.connect.source.SourceRecord heartbeat)
-
toMicroSecondsSinceEpoch
private long toMicroSecondsSinceEpoch(LocalDateTime localDateTime)
-
shouldCreateSnapshotSchemaOnlyRecoveryExceptionWithoutOffset
@FixFor("DBZ-3986") public void shouldCreateSnapshotSchemaOnlyRecoveryExceptionWithoutOffset()
-
shouldCreateSnapshotSchemaOnlyRecovery
@FixFor("DBZ-3986") public void shouldCreateSnapshotSchemaOnlyRecovery() throws Exception
- Throws:
Exception
-
shouldCreateSnapshotSchemaOnlyExceptionWithoutHistory
@FixFor("DBZ-3986") public void shouldCreateSnapshotSchemaOnlyExceptionWithoutHistory() throws Exception
- Throws:
Exception
-
shouldSkipDataOnSnapshotSchemaOnly
@FixFor("DBZ-3986") public void shouldSkipDataOnSnapshotSchemaOnly() throws Exception
- Throws:
Exception
-
shouldWarnAboutTableNameLengthExceeded
@FixFor("DBZ-4161") public void shouldWarnAboutTableNameLengthExceeded() throws Exception
- Throws:
Exception
-
shouldWarnAboutColumnNameLengthExceeded
@FixFor("DBZ-4161") public void shouldWarnAboutColumnNameLengthExceeded() throws Exception
- Throws:
Exception
-
shouldSafelySnapshotAndStreamWithDatabaseIncludeList
@FixFor("DBZ-3611") public void shouldSafelySnapshotAndStreamWithDatabaseIncludeList() throws Exception
- Throws:
Exception
-
shouldSafelySnapshotAndStreamWithDatabaseExcludeList
@FixFor("DBZ-3611") public void shouldSafelySnapshotAndStreamWithDatabaseExcludeList() throws Exception
database include/exclude list are not support (yet) for the Oracle connector; this test is just there to make sure that the presence of these (functionally ignored) properties doesn't cause any problems.- Throws:
Exception
-
shouldNotRaiseNullPointerExceptionWithNonUppercaseDatabaseName
@FixFor("DBZ-4376") public void shouldNotRaiseNullPointerExceptionWithNonUppercaseDatabaseName() throws Exception
- Throws:
Exception
-
consumeRecords
@FixFor("DBZ-3986") private void consumeRecords(Configuration config) throws SQLException, InterruptedException
- Throws:
SQLExceptionInterruptedException
-
waitForCurrentScnToHaveBeenSeenByConnector
private void waitForCurrentScnToHaveBeenSeenByConnector() throws SQLException- Throws:
SQLException
-
-