Class ExtractNewDocumentStateTestIT
- java.lang.Object
-
- io.debezium.embedded.AbstractConnectorTest
-
- io.debezium.connector.mongodb.transforms.AbstractExtractNewDocumentStateTestIT
-
- io.debezium.connector.mongodb.transforms.ExtractNewDocumentStateTestIT
-
- All Implemented Interfaces:
Testing
public class ExtractNewDocumentStateTestIT extends AbstractExtractNewDocumentStateTestIT
Integration test forExtractNewDocumentState. 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.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 StringADD_FIELDSprivate static StringADD_FIELDS_PREFIXprivate static StringADD_HEADERSprivate static StringADD_HEADERS_PREFIXprivate static StringADD_SOURCE_FIELDSprivate static StringARRAY_ENCODINGprivate static StringCONFIG_DROP_TOMBSTONESprivate static StringDELIMITERprivate static StringDROP_TOMBSTONEprivate static StringFLATTEN_STRUCTprivate static StringHANDLE_DELETESprivate static StringOPERATION_HEADER-
Fields inherited from class io.debezium.connector.mongodb.transforms.AbstractExtractNewDocumentStateTestIT
DB_NAME, SERVER_NAME, transformation
-
Fields inherited from class io.debezium.embedded.AbstractConnectorTest
engine, logger, logTestName, OFFSET_STORE_PATH, pollTimeoutInMs, skipTestRule
-
-
Constructor Summary
Constructors Constructor Description ExtractNewDocumentStateTestIT()
-
Method Summary
-
Methods inherited from class io.debezium.connector.mongodb.transforms.AbstractExtractNewDocumentStateTestIT
afterEach, beforeEach, beforeEach, getNextRecord, getRecordByOperation, getUpdateRecord, primary, restartConnectorWithoutEmittingTombstones, topicName
-
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, stopConnector, stopConnector, validate, waitForAvailableRecords, waitForConnectorShutdown, waitForSnapshotToBeCompleted, waitForStreamingRunning, waitForStreamingRunning, waitTimeForRecords, waitTimeForRecordsAfterNulls
-
-
-
-
Field Detail
-
CONFIG_DROP_TOMBSTONES
private static final String CONFIG_DROP_TOMBSTONES
- See Also:
- Constant Field Values
-
HANDLE_DELETES
private static final String HANDLE_DELETES
- See Also:
- Constant Field Values
-
FLATTEN_STRUCT
private static final String FLATTEN_STRUCT
- See Also:
- Constant Field Values
-
DELIMITER
private static final String DELIMITER
- See Also:
- Constant Field Values
-
OPERATION_HEADER
private static final String OPERATION_HEADER
- See Also:
- Constant Field Values
-
DROP_TOMBSTONE
private static final String DROP_TOMBSTONE
- See Also:
- Constant Field Values
-
ADD_SOURCE_FIELDS
private static final String ADD_SOURCE_FIELDS
- See Also:
- Constant Field Values
-
ADD_HEADERS
private static final String ADD_HEADERS
- See Also:
- Constant Field Values
-
ADD_FIELDS
private static final String ADD_FIELDS
- See Also:
- Constant Field Values
-
ADD_FIELDS_PREFIX
private static final String ADD_FIELDS_PREFIX
- See Also:
- Constant Field Values
-
ADD_HEADERS_PREFIX
private static final String ADD_HEADERS_PREFIX
- See Also:
- Constant Field Values
-
ARRAY_ENCODING
private static final String ARRAY_ENCODING
- See Also:
- Constant Field Values
-
-
Method Detail
-
getCollectionName
protected String getCollectionName()
- Specified by:
getCollectionNamein classAbstractExtractNewDocumentStateTestIT
-
shouldDropTombstoneByDefault
@FixFor("DBZ-563") public void shouldDropTombstoneByDefault() throws InterruptedException
- Throws:
InterruptedException
-
shouldTransformEvents
public void shouldTransformEvents() throws InterruptedException, IOException- Throws:
InterruptedExceptionIOException
-
shouldSupportDbRef
@FixFor("DBZ-1767") public void shouldSupportDbRef() throws InterruptedException, IOException
- Throws:
InterruptedExceptionIOException
-
shouldSupportSubSanitizeFieldName
@FixFor("DBZ-2680") public void shouldSupportSubSanitizeFieldName() throws InterruptedException, IOException
- Throws:
InterruptedExceptionIOException
-
shouldAddSourceFields
@FixFor("DBZ-1442") public void shouldAddSourceFields() throws InterruptedException
- Throws:
InterruptedException
-
shouldAddSourceFieldsForRewriteDeleteEvent
@FixFor("DBZ-1442") public void shouldAddSourceFieldsForRewriteDeleteEvent() throws InterruptedException
- Throws:
InterruptedException
-
shouldTransformRecordForInsertEvent
public void shouldTransformRecordForInsertEvent() throws InterruptedException- Throws:
InterruptedException
-
shouldTransformRecordForInsertEventWithComplexIdType
public void shouldTransformRecordForInsertEventWithComplexIdType() throws InterruptedException- Throws:
InterruptedException
-
shouldGenerateRecordForUpdateEvent
public void shouldGenerateRecordForUpdateEvent() throws InterruptedException- 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
@FixFor("DBZ-583") public void shouldDropDeleteMessagesByDefault() throws InterruptedException
- Throws:
InterruptedException
-
shouldRewriteDeleteMessage
@FixFor("DBZ-583") public void shouldRewriteDeleteMessage() throws InterruptedException
- Throws:
InterruptedException
-
shouldRewriteMessagesWhichAreNotDeletes
@FixFor("DBZ-583") public void shouldRewriteMessagesWhichAreNotDeletes() throws InterruptedException
- Throws:
InterruptedException
-
shouldGenerateRecordForDeleteEvent
public void shouldGenerateRecordForDeleteEvent() throws InterruptedException- Throws:
InterruptedException
-
shouldPropagatePreviousRecordHeaders
@FixFor("DBZ-971") public void shouldPropagatePreviousRecordHeaders() throws InterruptedException
- Throws:
InterruptedException
-
shouldNotFlattenTransformRecordForInsertEvent
public void shouldNotFlattenTransformRecordForInsertEvent() throws InterruptedException- Throws:
InterruptedException
-
shouldFlattenTransformRecordForInsertEvent
public void shouldFlattenTransformRecordForInsertEvent() throws InterruptedException- Throws:
InterruptedException
-
shouldFlattenWithDelimiterTransformRecordForInsertEvent
public void shouldFlattenWithDelimiterTransformRecordForInsertEvent() throws InterruptedException- Throws:
InterruptedException
-
shouldFlattenWithDelimiterTransformRecordForUpdateEvent
public void shouldFlattenWithDelimiterTransformRecordForUpdateEvent() throws InterruptedException- Throws:
InterruptedException
-
testAddHeadersForMissingOrInvalidFields
@FixFor("DBZ-1791") public void testAddHeadersForMissingOrInvalidFields() throws Exception
- Throws:
Exception
-
testAddHeadersSpecifyingStruct
@FixFor({"DBZ-1791","DBZ-2504"}) public void testAddHeadersSpecifyingStruct() throws Exception
- Throws:
Exception
-
testAddFields
@FixFor({"DBZ-1791","DBZ-2504"}) public void testAddFields() throws Exception
- Throws:
Exception
-
testAddFieldsForMissingOptionalField
@FixFor("DBZ-1791") public void testAddFieldsForMissingOptionalField() throws Exception
- Throws:
Exception
-
testAddFieldsSpecifyStruct
@FixFor("DBZ-1791") public void testAddFieldsSpecifyStruct() throws Exception
- Throws:
Exception
-
testAddFieldHandleDeleteRewrite
@FixFor("DBZ-1791") public void testAddFieldHandleDeleteRewrite() throws Exception
- Throws:
Exception
-
tesAddFieldsHandleDeleteRewrite
@FixFor("DBZ-1791") public void tesAddFieldsHandleDeleteRewrite() throws Exception
- Throws:
Exception
-
testAddFieldsSpecifyStructHandleDeleteRewrite
@FixFor("DBZ-1791") public void testAddFieldsSpecifyStructHandleDeleteRewrite() throws Exception
- Throws:
Exception
-
testAddFieldsHandleDeleteRewriteAndTombstone
@FixFor("DBZ-1791") public void testAddFieldsHandleDeleteRewriteAndTombstone() throws Exception
- Throws:
Exception
-
testEmptyArray
@FixFor("DBZ-2585") public void testEmptyArray() throws InterruptedException, IOException
- Throws:
InterruptedExceptionIOException
-
testAddPatchFieldAfterUpdate
@FixFor("DBZ-2455") public void testAddPatchFieldAfterUpdate() throws Exception
- Throws:
Exception
-
testShouldThrowExceptionWithElementsDifferingStructures
@FixFor("DBZ-2316") public void testShouldThrowExceptionWithElementsDifferingStructures() throws Exception
- Throws:
Exception
-
testMatrixType
@FixFor("DBZ-2569") public void testMatrixType() throws InterruptedException, IOException
- 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
private org.apache.kafka.connect.source.SourceRecord createCreateRecord() throws Exception- Throws:
Exception
-
createDeleteRecordWithTombstone
private AbstractConnectorTest.SourceRecords createDeleteRecordWithTombstone() throws Exception
- Throws:
Exception
-
waitForStreamingRunning
private static void waitForStreamingRunning() throws InterruptedException- Throws:
InterruptedException
-
-