Class ExtractNewDocumentStateTestIT
java.lang.Object
io.debezium.embedded.AbstractConnectorTest
io.debezium.connector.mongodb.AbstractMongoConnectorIT
io.debezium.connector.mongodb.transforms.AbstractExtractNewDocumentStateTestIT
io.debezium.connector.mongodb.transforms.ExtractNewDocumentStateTestIT
- All Implemented Interfaces:
Testing
Integration test for
ExtractNewDocumentState. It sends operations into
MongoDB and listens on messages that are generated by Debezium plug-in. The messages
are then run through the SMT itself.- Author:
- Jiri Pechanec
-
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 TypeFieldDescriptionprivate static final Stringprivate static final Stringprivate static final Stringprivate static final Stringprivate static final Stringprivate static final Stringprivate static final Stringprivate static final Stringprivate static final Stringprivate static final StringFields inherited from class io.debezium.connector.mongodb.transforms.AbstractExtractNewDocumentStateTestIT
DB_NAME, SERVER_NAME, transformationFields inherited from class io.debezium.connector.mongodb.AbstractMongoConnectorIT
config, context, logInterceptorFields inherited from class io.debezium.embedded.AbstractConnectorTest
consumedLines, engine, logger, logTestName, OFFSET_STORE_PATH, pollTimeoutInMs, skipTestRule -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate org.apache.kafka.connect.source.SourceRecordcreateCreateRecordFromJson(String pathOnClasspath) protected Stringprivate StringgetSourceRecordHeaderByKey(org.apache.kafka.connect.source.SourceRecord record, String headerKey) voidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidprivate static voidMethods inherited from class io.debezium.connector.mongodb.transforms.AbstractExtractNewDocumentStateTestIT
afterEach, beforeEach, beforeEach, getNextRecord, getRecordByOperation, getUpdateRecord, restartConnectorWithoutEmittingTombstones, topicNameMethods inherited from class io.debezium.connector.mongodb.AbstractMongoConnectorIT
connectionErrorHandler, deleteDocuments, dropAndInsertDocuments, getSnapshotMetricsObjectName, getSnapshotMetricsObjectName, getStreamingMetricsObjectName, getStreamingMetricsObjectName, insertDocuments, insertDocumentsInTx, loadTestDocuments, primary, storeDocuments, storeDocuments, updateDocument, updateDocumentsInTx, waitForSnapshotToBeCompleted, waitForSnapshotToBeCompleted, waitForStreamingRunning, waitForStreamingRunningMethods 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, consumeRecordsByTopicUntil, consumeRecordsUntil, debug, getConsumer, getMaximumEnqueuedRecordCount, getStreamingMetricsObjectName, getStreamingNamespace, initializeConnectorTestFramework, isStreamingRunning, isStreamingRunning, isTransactionRecord, loggingCompletion, print, readLastCommittedOffset, readLastCommittedOffsets, setConsumeTimeout, skipAvroValidation, start, start, start, start, start, start, start, startAndConsumeTillEnd, startAndConsumeTillEnd, stopConnector, stopConnector, validate, waitForAvailableRecords, waitForConnectorShutdown, waitForStreamingRunning, waitTimeForRecords, waitTimeForRecordsAfterNulls
-
Field Details
-
CONFIG_DROP_TOMBSTONES
- See Also:
-
HANDLE_DELETES
- See Also:
-
FLATTEN_STRUCT
- See Also:
-
DELIMITER
- See Also:
-
DROP_TOMBSTONE
- See Also:
-
ADD_HEADERS
- See Also:
-
ADD_FIELDS
- See Also:
-
ADD_FIELDS_PREFIX
- See Also:
-
ADD_HEADERS_PREFIX
- See Also:
-
ARRAY_ENCODING
- See Also:
-
-
Constructor Details
-
ExtractNewDocumentStateTestIT
public ExtractNewDocumentStateTestIT()
-
-
Method Details
-
getCollectionName
- Specified by:
getCollectionNamein classAbstractExtractNewDocumentStateTestIT
-
shouldDropTombstoneByDefault
- Throws:
InterruptedException
-
shouldTransformEvents
- Throws:
InterruptedExceptionIOException
-
shouldSupportDbRef
- Throws:
InterruptedExceptionIOException
-
shouldSupportSubSanitizeFieldName
@FixFor("DBZ-2680") public void shouldSupportSubSanitizeFieldName() throws InterruptedException, IOException- Throws:
InterruptedExceptionIOException
-
shouldAddFields
- Throws:
InterruptedException
-
shouldAddFieldsForRewriteDeleteEvent
- Throws:
InterruptedException
-
shouldTransformRecordForInsertEvent
- Throws:
InterruptedException
-
shouldTransformRecordForInsertEventWithComplexIdType
- Throws:
InterruptedException
-
shouldGenerateRecordForUpdateEvent
- Throws:
InterruptedException
-
shouldGenerateRecordForUpdateEventWithUnset
@FixFor("DBZ-612") public void shouldGenerateRecordForUpdateEventWithUnset() throws InterruptedException- Throws:
InterruptedException
-
shouldGenerateRecordForUnsetOnlyUpdateEvent
@FixFor("DBZ-612") public void shouldGenerateRecordForUnsetOnlyUpdateEvent() throws InterruptedException- Throws:
InterruptedException
-
shouldGenerateRecordForDeleteEventWithoutTombstone
@FixFor("DBZ-582") public void shouldGenerateRecordForDeleteEventWithoutTombstone() throws InterruptedException- Throws:
InterruptedException
-
shouldGenerateRecordHeaderForTombstone
@FixFor("DBZ-1032") public void shouldGenerateRecordHeaderForTombstone() throws InterruptedException- Throws:
InterruptedException
-
shouldDropDeleteMessagesByDefault
- Throws:
InterruptedException
-
shouldRewriteDeleteMessage
- Throws:
InterruptedException
-
shouldRewriteMessagesWhichAreNotDeletes
@FixFor("DBZ-583") public void shouldRewriteMessagesWhichAreNotDeletes() throws InterruptedException- Throws:
InterruptedException
-
shouldGenerateRecordForDeleteEvent
- Throws:
InterruptedException
-
shouldPropagatePreviousRecordHeaders
- Throws:
InterruptedException
-
shouldNotFlattenTransformRecordForInsertEvent
- Throws:
InterruptedException
-
shouldFlattenTransformRecordForInsertEvent
- Throws:
InterruptedException
-
shouldFlattenWithDelimiterTransformRecordForInsertEvent
- Throws:
InterruptedException
-
shouldFlattenWithDelimiterTransformRecordForUpdateEvent
- Throws:
InterruptedException
-
testAddHeader
- Throws:
Exception
-
testAddHeadersForMissingOrInvalidFields
- Throws:
Exception
-
testAddHeadersSpecifyingStruct
- Throws:
Exception
-
testAddField
- Throws:
Exception
-
testAddFields
- Throws:
Exception
-
testAddFieldsForMissingOptionalField
- Throws:
Exception
-
testAddFieldsSpecifyStruct
- Throws:
Exception
-
testAddFieldHandleDeleteRewrite
- Throws:
Exception
-
tesAddFieldsHandleDeleteRewrite
- Throws:
Exception
-
testAddFieldsSpecifyStructHandleDeleteRewrite
- Throws:
Exception
-
testAddFieldsHandleDeleteRewriteAndTombstone
- Throws:
Exception
-
testEmptyArray
- Throws:
InterruptedExceptionIOException
-
testAddPatchFieldAfterUpdate
- Throws:
Exception
-
testShouldThrowExceptionWithElementsDifferingStructures
@FixFor("DBZ-2316") public void testShouldThrowExceptionWithElementsDifferingStructures() throws Exception- Throws:
Exception
-
testMatrixType
- Throws:
InterruptedExceptionIOException
-
testMatrixArrayAsDocumentType
@FixFor("DBZ-2569") public void testMatrixArrayAsDocumentType() throws InterruptedException, IOException- Throws:
InterruptedExceptionIOException
-
createCreateRecordFromJson
private AbstractConnectorTest.SourceRecords createCreateRecordFromJson(String pathOnClasspath) throws Exception - Throws:
Exception
-
createCreateRecord
- Throws:
Exception
-
createDeleteRecordWithTombstone
- Throws:
Exception
-
waitForStreamingRunning
- Throws:
InterruptedException
-
getSourceRecordHeaderByKey
-