Class AbstractProcessorUnitTest<T extends io.debezium.connector.oracle.logminer.processor.AbstractLogMinerEventProcessor>
java.lang.Object
io.debezium.embedded.AbstractConnectorTest
io.debezium.connector.oracle.logminer.processor.AbstractProcessorUnitTest<T>
- All Implemented Interfaces:
Testing
- Direct Known Subclasses:
EmbeddedInfinispanProcessorTest,MemoryProcessorTest
public abstract class AbstractProcessorUnitTest<T extends io.debezium.connector.oracle.logminer.processor.AbstractLogMinerEventProcessor>
extends AbstractConnectorTest
Abstract class implementation for all unit tests for
LogMinerEventProcessor implementations.- Author:
- Chris Cranford
-
Nested Class Summary
Nested classes/interfaces inherited from class io.debezium.embedded.AbstractConnectorTest
AbstractConnectorTest.SourceRecordsNested classes/interfaces inherited from interface io.debezium.util.Testing
Testing.Debug, Testing.Files, Testing.InterruptableFunction, Testing.Network, Testing.Print, Testing.Timer -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected io.debezium.connector.oracle.OracleConnectionprotected io.debezium.pipeline.source.spi.ChangeEventSource.ChangeEventSourceContextprotected EventDispatcher<io.debezium.connector.oracle.OraclePartition,TableId> protected io.debezium.connector.oracle.logminer.LogMinerStreamingChangeEventSourceMetricsprotected io.debezium.connector.oracle.OracleOffsetContextprotected io.debezium.connector.oracle.OraclePartitionprotected io.debezium.connector.oracle.OracleDatabaseSchemaorg.junit.rules.TestRuleprivate static final Stringprivate static final Stringprivate static final StringFields inherited from class io.debezium.embedded.AbstractConnectorTest
consumedLines, engine, isEngineRunning, logger, logTestName, OFFSET_STORE_PATH, pollTimeoutInMs, skipTestRule -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidafter()voidbefore()private io.debezium.connector.oracle.logminer.LogMinerStreamingChangeEventSourceMetricscreateMetrics(io.debezium.connector.oracle.OracleDatabaseSchema schema) private io.debezium.connector.oracle.OracleConnectioncreateOracleConnection(boolean singleOptionalValueThrowException) private io.debezium.connector.oracle.OracleDatabaseSchemaprivate io.debezium.connector.oracle.logminer.events.LogMinerEventRowgetCommitLogMinerEventRow(io.debezium.connector.oracle.Scn scn, String transactionId) protected abstract Configuration.Builderprivate io.debezium.connector.oracle.logminer.events.LogMinerEventRowgetInsertLogMinerEventRow(io.debezium.connector.oracle.Scn scn, String transactionId) private io.debezium.connector.oracle.logminer.events.LogMinerEventRowgetInsertLogMinerEventRow(io.debezium.connector.oracle.Scn scn, String transactionId, Instant changeTime) protected abstract TgetProcessor(io.debezium.connector.oracle.OracleConnectorConfig connectorConfig) private io.debezium.connector.oracle.logminer.events.LogMinerEventRowgetRollbackLogMinerEventRow(io.debezium.connector.oracle.Scn scn, String transactionId) private io.debezium.connector.oracle.logminer.events.LogMinerEventRowgetStartLogMinerEventRow(io.debezium.connector.oracle.Scn scn, String transactionId) private io.debezium.connector.oracle.logminer.events.LogMinerEventRowgetStartLogMinerEventRow(io.debezium.connector.oracle.Scn scn, String transactionId, Instant changeTime) protected booleanvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidMethods 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, consumeAvailableRecordsByTopic, consumeDmlRecordsByTopic, consumeDmlRecordsByTopic, consumeDmlRecordsByTopic, consumeRecord, consumeRecords, consumeRecords, consumeRecords, consumeRecordsButSkipUntil, consumeRecordsByTopic, consumeRecordsByTopic, consumeRecordsByTopic, consumeRecordsByTopicUntil, consumeRecordsUntil, createEngine, createEngineBuilder, debug, getConsumer, getMaximumEnqueuedRecordCount, getSnapshotMetricsObjectName, getSnapshotMetricsObjectName, getSnapshotMetricsObjectName, getStreamingMetricsObjectName, getStreamingMetricsObjectName, getStreamingMetricsObjectName, getStreamingMetricsObjectName, getStreamingNamespace, initializeConnectorTestFramework, isStreamingRunning, isStreamingRunning, isStreamingRunning, isStreamingRunning, isTransactionRecord, loggingCompletion, print, readLastCommittedOffset, readLastCommittedOffsets, setConsumeTimeout, skipAvroValidation, start, start, start, start, start, start, start, startAndConsumeTillEnd, startAndConsumeTillEnd, stopConnector, stopConnector, storeOffsets, validate, waitForAvailableRecords, waitForConnectorShutdown, waitForEngineShutdown, waitForSnapshotToBeCompleted, waitForSnapshotToBeCompleted, waitForSnapshotWithCustomMetricsToBeCompleted, waitForStreamingRunning, waitForStreamingRunning, waitForStreamingRunning, waitForStreamingWithCustomMetricsToStart, waitTimeForRecords, waitTimeForRecordsAfterNulls
-
Field Details
-
TRANSACTION_ID_1
- See Also:
-
TRANSACTION_ID_2
- See Also:
-
TRANSACTION_ID_3
- See Also:
-
skipRule
public org.junit.rules.TestRule skipRule -
context
protected io.debezium.pipeline.source.spi.ChangeEventSource.ChangeEventSourceContext context -
dispatcher
-
schema
protected io.debezium.connector.oracle.OracleDatabaseSchema schema -
metrics
protected io.debezium.connector.oracle.logminer.LogMinerStreamingChangeEventSourceMetrics metrics -
partition
protected io.debezium.connector.oracle.OraclePartition partition -
offsetContext
protected io.debezium.connector.oracle.OracleOffsetContext offsetContext -
connection
protected io.debezium.connector.oracle.OracleConnection connection
-
-
Constructor Details
-
AbstractProcessorUnitTest
public AbstractProcessorUnitTest()
-
-
Method Details
-
before
- Throws:
Exception
-
after
public void after() -
getConfig
-
getProcessor
protected abstract T getProcessor(io.debezium.connector.oracle.OracleConnectorConfig connectorConfig) -
isTransactionAbandonmentSupported
protected boolean isTransactionAbandonmentSupported() -
testCacheIsEmpty
- Throws:
Exception
-
testCacheIsNotEmptyWhenTransactionIsAdded
- Throws:
Exception
-
testCacheIsEmptyWhenTransactionIsCommitted
- Throws:
Exception
-
testCacheIsEmptyWhenTransactionIsRolledBack
- Throws:
Exception
-
testCacheIsNotEmptyWhenFirstTransactionIsRolledBack
- Throws:
Exception
-
testCacheIsNotEmptyWhenSecondTransactionIsRolledBack
- Throws:
Exception
-
testCalculateScnWhenTransactionIsCommitted
- Throws:
Exception
-
testCalculateScnWhenFirstTransactionIsCommitted
- Throws:
Exception
-
testCalculateScnWhenSecondTransactionIsCommitted
- Throws:
Exception
-
testAbandonOneTransaction
- Throws:
Exception
-
testAbandonTransactionHavingAnotherOne
- Throws:
Exception
-
testAbandonTransactionsUsingFallbackBasedOnChangeTime
@FixFor("DBZ-6355") public void testAbandonTransactionsUsingFallbackBasedOnChangeTime() throws Exception- Throws:
Exception
-
createOracleDatabaseSchema
private io.debezium.connector.oracle.OracleDatabaseSchema createOracleDatabaseSchema() throws Exception- Throws:
Exception
-
createOracleConnection
private io.debezium.connector.oracle.OracleConnection createOracleConnection(boolean singleOptionalValueThrowException) throws Exception - Throws:
Exception
-
createMetrics
private io.debezium.connector.oracle.logminer.LogMinerStreamingChangeEventSourceMetrics createMetrics(io.debezium.connector.oracle.OracleDatabaseSchema schema) throws Exception - Throws:
Exception
-
getStartLogMinerEventRow
private io.debezium.connector.oracle.logminer.events.LogMinerEventRow getStartLogMinerEventRow(io.debezium.connector.oracle.Scn scn, String transactionId) -
getStartLogMinerEventRow
-
getCommitLogMinerEventRow
private io.debezium.connector.oracle.logminer.events.LogMinerEventRow getCommitLogMinerEventRow(io.debezium.connector.oracle.Scn scn, String transactionId) -
getRollbackLogMinerEventRow
private io.debezium.connector.oracle.logminer.events.LogMinerEventRow getRollbackLogMinerEventRow(io.debezium.connector.oracle.Scn scn, String transactionId) -
getInsertLogMinerEventRow
private io.debezium.connector.oracle.logminer.events.LogMinerEventRow getInsertLogMinerEventRow(io.debezium.connector.oracle.Scn scn, String transactionId) -
getInsertLogMinerEventRow
-