Package io.debezium.transforms.outbox
Class AbstractEventRouterTest<T extends org.apache.kafka.connect.source.SourceConnector>
java.lang.Object
io.debezium.embedded.AbstractConnectorTest
io.debezium.transforms.outbox.AbstractEventRouterTest<T>
- All Implemented Interfaces:
Testing
public abstract class AbstractEventRouterTest<T extends org.apache.kafka.connect.source.SourceConnector>
extends AbstractConnectorTest
A unified test of all
EventRouter behavior which all connectors should extend.- 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 EventRouter<org.apache.kafka.connect.source.SourceRecord>Fields inherited from class io.debezium.embedded.AbstractConnectorTest
consumedLines, engine, isEngineRunning, logger, logTestName, OFFSET_STORE_PATH, pollTimeoutInMs, skipTestRule -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidprotected abstract voidprotected abstract voidprotected abstract voidvoidprotected abstract StringcreateInsert(String eventId, String eventType, String aggregateType, String aggregateId, String payloadJson, String additional) protected abstract voidprotected abstract JdbcConnectionprivate voidprivate Stringprotected abstract StringgetAdditionalFieldValues(boolean deleted) protected abstract Stringprotected abstract Configuration.BuildergetConfigurationBuilder(boolean initialSnapshot) protected Stringprotected Stringprotected Stringprotected Stringprotected Objectprotected org.apache.kafka.connect.data.Schemaprotected Stringprotected abstract org.apache.kafka.connect.data.Schemaprotected abstract Stringprotected Stringprivate Stringvoidvoidvoidvoidvoidvoidvoidvoidvoidprivate voidprivate voidprotected abstract Stringprotected abstract Stringprotected abstract voidprotected abstract voidMethods 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, 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, validate, waitForAvailableRecords, waitForConnectorShutdown, waitForSnapshotToBeCompleted, waitForSnapshotToBeCompleted, waitForSnapshotWithCustomMetricsToBeCompleted, waitForStreamingRunning, waitForStreamingRunning, waitForStreamingRunning, waitForStreamingWithCustomMetricsToStart, waitTimeForRecords, waitTimeForRecordsAfterNulls
-
Field Details
-
outboxEventRouter
-
-
Constructor Details
-
AbstractEventRouterTest
public AbstractEventRouterTest()
-
-
Method Details
-
getConnectorClass
-
databaseConnection
-
getConfigurationBuilder
-
topicName
-
tableName
-
getSchemaNamePrefix
-
getPayloadSchema
protected abstract org.apache.kafka.connect.data.Schema getPayloadSchema() -
createTable
- Throws:
Exception
-
alterTableWithExtra4Fields
- Throws:
Exception
-
alterTableWithTimestampField
- Throws:
Exception
-
alterTableModifyPayload
- Throws:
Exception
-
getAdditionalFieldValues
-
getAdditionalFieldValuesTimestampOnly
-
createInsert
-
waitForSnapshotCompleted
- Throws:
InterruptedException
-
waitForStreamingStarted
- Throws:
InterruptedException
-
beforeEach
- Throws:
Exception
-
afterEach
- Throws:
Exception
-
shouldConsumeRecordsFromInsert
- Throws:
Exception
-
shouldSendEventTypeAsHeader
- Throws:
Exception
-
shouldSendEventTypeAsValue
- Throws:
Exception
-
shouldRespectJsonFormatAsString
- Throws:
Exception
-
shouldSupportAllFeatures
- Throws:
Exception
-
shouldConvertMicrosecondsTimestampToMilliseconds
@FixFor({"DBZ-1707","DBZ-3940"}) public void shouldConvertMicrosecondsTimestampToMilliseconds() throws Exception- Throws:
Exception
-
shouldNotProduceTombstoneEventForNullPayload
@FixFor({"DBZ-1320","DBZ-3940"}) public void shouldNotProduceTombstoneEventForNullPayload() throws Exception- Throws:
Exception
-
shouldProduceTombstoneEventForNullPayload
@FixFor({"DBZ-1320","DBZ-3940"}) public void shouldProduceTombstoneEventForNullPayload() throws Exception- Throws:
Exception
-
shouldProduceTombstoneEventForEmptyPayload
@FixFor({"DBZ-1320","DBZ-3940"}) public void shouldProduceTombstoneEventForEmptyPayload() throws Exception- Throws:
Exception
-
getFieldEventType
-
getFieldSchemaVersion
-
getFieldEventTimestamp
-
getFieldAggregateType
-
getSomeBoolType
-
getIsDeleted
-
getIdSchema
protected org.apache.kafka.connect.data.Schema getIdSchema() -
getId
-
envelope
-
header
-
startConnectorWithInitialSnapshotRecord
- Throws:
Exception
-
startConnectorWithNoSnapshot
- Throws:
Exception
-
doInsert
- Throws:
SQLException
-