Class OracleConnectorIT

  • All Implemented Interfaces:
    Testing

    public class OracleConnectorIT
    extends AbstractConnectorTest
    Integration test for the Debezium Oracle connector.
    Author:
    Gunnar Morling
    • Field Detail

      • LOGGER

        private static final org.slf4j.Logger LOGGER
      • MICROS_PER_SECOND

        private static final long MICROS_PER_SECOND
      • 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
    • Constructor Detail

      • OracleConnectorIT

        public OracleConnectorIT()
    • Method Detail

      • shouldSnapshotAndStreamWithHyphenedTableName

        @FixFor("DBZ-2452")
        public void shouldSnapshotAndStreamWithHyphenedTableName()
                                                          throws Exception
        Throws:
        Exception
      • shouldTakeSnapshot

        public void shouldTakeSnapshot()
                                throws Exception
        Throws:
        Exception
      • shouldContinueWithStreamingAfterSnapshot

        public void shouldContinueWithStreamingAfterSnapshot()
                                                      throws Exception
        Throws:
        Exception
      • shouldStreamAfterRestart

        public void shouldStreamAfterRestart()
                                      throws Exception
        Throws:
        Exception
      • shouldStreamAfterRestartAfterSnapshot

        public void shouldStreamAfterRestartAfterSnapshot()
                                                   throws Exception
        Throws:
        Exception
      • shouldReadChangeStreamForExistingTable

        public void shouldReadChangeStreamForExistingTable()
                                                    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
      • 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
      • shouldCaptureChangesForTransactionsAcrossSnapshotBoundary

        @FixFor("DBZ-4367")
        public void shouldCaptureChangesForTransactionsAcrossSnapshotBoundary()
                                                                       throws Exception
        Throws:
        Exception
      • shouldCaptureChangesForTransactionsAcrossSnapshotBoundaryWithoutDuplicatingSnapshottedChanges

        @FixFor("DBZ-4367")
        public void shouldCaptureChangesForTransactionsAcrossSnapshotBoundaryWithoutDuplicatingSnapshottedChanges()
                                                                                                           throws Exception
        Throws:
        Exception
      • shouldCaptureChangesForTransactionsAcrossSnapshotBoundaryWithoutReemittingDDLChanges

        @FixFor("DBZ-4367")
        public void shouldCaptureChangesForTransactionsAcrossSnapshotBoundaryWithoutReemittingDDLChanges()
                                                                                                  throws Exception
        Throws:
        Exception
      • waitForCurrentScnToHaveBeenSeenByConnector

        private void waitForCurrentScnToHaveBeenSeenByConnector()
                                                         throws SQLException
        Throws:
        SQLException
      • getAfter

        private org.apache.kafka.connect.data.Struct getAfter​(org.apache.kafka.connect.source.SourceRecord record)