Package io.debezium.connector.mongodb
Class FieldExcludeListIT
java.lang.Object
io.debezium.embedded.AbstractConnectorTest
io.debezium.connector.mongodb.AbstractMongoConnectorIT
io.debezium.connector.mongodb.FieldExcludeListIT
- All Implemented Interfaces:
Testing
-
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 StringFields inherited from class io.debezium.connector.mongodb.AbstractMongoConnectorIT
config, context, logInterceptor, mongoFields inherited from class io.debezium.embedded.AbstractConnectorTest
consumedLines, engine, isEngineRunning, logger, logTestName, OFFSET_STORE_PATH, pollTimeoutInMs, skipTestRule -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate voidassertInsertRecord(String dbName, String collectionName, String blackList, org.bson.Document insertRecord, String field, String expected) private voidassertInsertRecord(String blackList, org.bson.Document insertRecord, String field, String expected) private voidassertReadRecord(String dbName, String collectionName, String blackList, org.bson.Document snapshotRecord, String field, String expected) private voidassertReadRecord(String blackList, org.bson.Document snapshotRecord, String field, String expected) private voidassertUpdateRecord(String dbName, String collectionName, String blackList, org.bson.types.ObjectId objectId, org.bson.Document snapshotRecord, org.bson.Document updateRecord, boolean doSet, String field, FieldBlacklistIT.ExpectedUpdate expected) private voidassertUpdateRecord(String blackList, org.bson.types.ObjectId objectId, org.bson.Document snapshotRecord, org.bson.Document updateRecord, boolean doSet, String field, FieldBlacklistIT.ExpectedUpdate expected) private voidassertUpdateRecord(String blackList, org.bson.types.ObjectId objectId, org.bson.Document snapshotRecord, org.bson.Document updateRecord, String field, FieldBlacklistIT.ExpectedUpdate expected) private voiddeleteDocuments(String dbName, String collectionName, org.bson.types.ObjectId objId) private ConfigurationgetConfiguration(String blackList) private ConfigurationgetConfiguration(String fieldExcludeList, String database, String collection) private org.apache.kafka.connect.data.StructgetValue(org.apache.kafka.connect.source.SourceRecord record) voidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidprivate voidstoreDocuments(String dbName, String collectionName, org.bson.Document... documents) private voidupdateDocuments(String dbName, String collectionName, org.bson.types.ObjectId objId, org.bson.Document document, boolean doSet) private StringMethods inherited from class io.debezium.connector.mongodb.AbstractMongoConnectorIT
afterAll, afterEach, beforeAll, beforeEach, connect, deleteDocuments, dropAndInsertDocuments, getSnapshotMetricsObjectName, getSnapshotMetricsObjectName, getStreamingMetricsObjectName, getStreamingMetricsObjectName, insertDocuments, insertDocumentsInTx, loadTestDocuments, 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, consumeAvailableRecordsByTopic, consumeDmlRecordsByTopic, consumeDmlRecordsByTopic, consumeDmlRecordsByTopic, consumeRecord, consumeRecords, consumeRecords, consumeRecords, consumeRecordsButSkipUntil, consumeRecordsByTopic, consumeRecordsByTopic, consumeRecordsByTopic, consumeRecordsByTopicUntil, consumeRecordsUntil, createEngine, createEngineBuilder, debug, getConsumer, getMaximumEnqueuedRecordCount, getSnapshotMetricsObjectName, getSnapshotMetricsObjectName, 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, waitForSnapshotWithCustomMetricsToBeCompleted, waitForStreamingRunning, waitForStreamingRunning, waitForStreamingWithCustomMetricsToStart, waitTimeForEngine, waitTimeForRecords, waitTimeForRecordsAfterNulls
-
Field Details
-
DATABASE_NAME
- See Also:
-
COLLECTION_NAME
- See Also:
-
SERVER_NAME
- See Also:
-
-
Constructor Details
-
FieldExcludeListIT
public FieldExcludeListIT()
-
-
Method Details
-
shouldNotExcludeFieldsForEventOfOtherCollection
- Throws:
InterruptedException
-
shouldExcludeFieldsForReadEvent
- Throws:
InterruptedException
-
shouldNotExcludeMissingFieldsForReadEvent
- Throws:
InterruptedException
-
shouldExcludeNestedFieldsForReadEvent
- Throws:
InterruptedException
-
shouldNotExcludeNestedMissingFieldsForReadEvent
- Throws:
InterruptedException
-
shouldExcludeFieldsForInsertEvent
- Throws:
InterruptedException
-
shouldNotExcludeMissingFieldsForInsertEvent
- Throws:
InterruptedException
-
shouldExcludeNestedFieldsForInsertEvent
- Throws:
InterruptedException
-
shouldNotExcludeNestedMissingFieldsForInsertEvent
- Throws:
InterruptedException
-
shouldExcludeFieldsForUpdateEvent
- Throws:
InterruptedException
-
shouldNotExcludeMissingFieldsForUpdateEvent
- Throws:
InterruptedException
-
shouldExcludeNestedFieldsForUpdateEventWithEmbeddedDocument
public void shouldExcludeNestedFieldsForUpdateEventWithEmbeddedDocument() throws InterruptedException- Throws:
InterruptedException
-
shouldNotExcludeNestedMissingFieldsForUpdateEventWithEmbeddedDocument
public void shouldNotExcludeNestedMissingFieldsForUpdateEventWithEmbeddedDocument() throws InterruptedException- Throws:
InterruptedException
-
shouldExcludeNestedFieldsForUpdateEventWithArrayOfEmbeddedDocuments
public void shouldExcludeNestedFieldsForUpdateEventWithArrayOfEmbeddedDocuments() throws InterruptedException- Throws:
InterruptedException
-
shouldNotExcludeNestedFieldsForUpdateEventWithArrayOfArrays
public void shouldNotExcludeNestedFieldsForUpdateEventWithArrayOfArrays() throws InterruptedException- Throws:
InterruptedException
-
shouldExcludeFieldsForSetTopLevelFieldUpdateEvent
- Throws:
InterruptedException
-
shouldExcludeFieldsForUnsetTopLevelFieldUpdateEvent
- Throws:
InterruptedException
-
shouldExcludeNestedFieldsForSetTopLevelFieldUpdateEventWithEmbeddedDocument
public void shouldExcludeNestedFieldsForSetTopLevelFieldUpdateEventWithEmbeddedDocument() throws InterruptedException- Throws:
InterruptedException
-
shouldExcludeNestedFieldsForSetTopLevelFieldUpdateEventWithArrayOfEmbeddedDocuments
public void shouldExcludeNestedFieldsForSetTopLevelFieldUpdateEventWithArrayOfEmbeddedDocuments() throws InterruptedException- Throws:
InterruptedException
-
shouldNotExcludeNestedFieldsForSetTopLevelFieldUpdateEventWithArrayOfArrays
public void shouldNotExcludeNestedFieldsForSetTopLevelFieldUpdateEventWithArrayOfArrays() throws InterruptedException- Throws:
InterruptedException
-
shouldExcludeNestedFieldsForSetNestedFieldUpdateEventWithEmbeddedDocument
public void shouldExcludeNestedFieldsForSetNestedFieldUpdateEventWithEmbeddedDocument() throws InterruptedException- Throws:
InterruptedException
-
shouldExcludeNestedFieldsForSetNestedFieldUpdateEventWithArrayOfEmbeddedDocuments
public void shouldExcludeNestedFieldsForSetNestedFieldUpdateEventWithArrayOfEmbeddedDocuments() throws InterruptedException- Throws:
InterruptedException
-
shouldNotExcludeNestedFieldsForSetNestedFieldUpdateEventWithArrayOfArrays
public void shouldNotExcludeNestedFieldsForSetNestedFieldUpdateEventWithArrayOfArrays() throws InterruptedException- Throws:
InterruptedException
-
shouldExcludeNestedFieldsForSetNestedFieldUpdateEventWithSeveralArrays
public void shouldExcludeNestedFieldsForSetNestedFieldUpdateEventWithSeveralArrays() throws InterruptedException- Throws:
InterruptedException
-
shouldExcludeFieldsForSetNestedFieldUpdateEventWithArrayOfEmbeddedDocuments
public void shouldExcludeFieldsForSetNestedFieldUpdateEventWithArrayOfEmbeddedDocuments() throws InterruptedException- Throws:
InterruptedException
-
shouldExcludeFieldsForSetToArrayFieldUpdateEventWithArrayOfEmbeddedDocuments
public void shouldExcludeFieldsForSetToArrayFieldUpdateEventWithArrayOfEmbeddedDocuments() throws InterruptedException- Throws:
InterruptedException
-
shouldExcludeNestedFieldsForUnsetNestedFieldUpdateEventWithEmbeddedDocument
public void shouldExcludeNestedFieldsForUnsetNestedFieldUpdateEventWithEmbeddedDocument() throws InterruptedException- Throws:
InterruptedException
-
shouldExcludeNestedFieldsForUnsetNestedFieldUpdateEventWithArrayOfEmbeddedDocuments
public void shouldExcludeNestedFieldsForUnsetNestedFieldUpdateEventWithArrayOfEmbeddedDocuments() throws InterruptedException- Throws:
InterruptedException
-
shouldNotExcludeNestedFieldsForUnsetNestedFieldUpdateEventWithArrayOfArrays
public void shouldNotExcludeNestedFieldsForUnsetNestedFieldUpdateEventWithArrayOfArrays() throws InterruptedException- Throws:
InterruptedException
-
shouldExcludeNestedFieldsForUnsetNestedFieldUpdateEventWithSeveralArrays
public void shouldExcludeNestedFieldsForUnsetNestedFieldUpdateEventWithSeveralArrays() throws InterruptedException- Throws:
InterruptedException
-
shouldExcludeFieldsForUnsetNestedFieldUpdateEventWithArrayOfEmbeddedDocuments
public void shouldExcludeFieldsForUnsetNestedFieldUpdateEventWithArrayOfEmbeddedDocuments() throws InterruptedException- Throws:
InterruptedException
-
shouldExcludeFieldsForDeleteEvent
- Throws:
InterruptedException
-
shouldExcludeFieldsForDeleteTombstoneEvent
- Throws:
InterruptedException
-
shouldExcludeFieldsIncludingDashesForReadEvent
@FixFor("DBZ-5328") public void shouldExcludeFieldsIncludingDashesForReadEvent() throws InterruptedException- Throws:
InterruptedException
-
shouldExcludeFieldsIncludingDashesForInsertEvent
@FixFor("DBZ-5328") public void shouldExcludeFieldsIncludingDashesForInsertEvent() throws InterruptedException- Throws:
InterruptedException
-
shouldExcludeNestedFieldsIncludingDashesForInsertEvent
@FixFor("DBZ-5328") public void shouldExcludeNestedFieldsIncludingDashesForInsertEvent() throws InterruptedException- Throws:
InterruptedException
-
shouldExcludeFieldsIncludingDashesForUpdateEvent
@FixFor("DBZ-5328") public void shouldExcludeFieldsIncludingDashesForUpdateEvent() throws InterruptedException- Throws:
InterruptedException
-
shouldExcludeFieldsIncludingSameNamesForReadEvent
@FixFor("DBZ-4846") public void shouldExcludeFieldsIncludingSameNamesForReadEvent() throws InterruptedException- Throws:
InterruptedException
-
getConfiguration
-
getConfiguration
-
getValue
private org.apache.kafka.connect.data.Struct getValue(org.apache.kafka.connect.source.SourceRecord record) -
storeDocuments
-
updateDocuments
-
deleteDocuments
-
assertReadRecord
private void assertReadRecord(String blackList, org.bson.Document snapshotRecord, String field, String expected) throws InterruptedException - Throws:
InterruptedException
-
assertReadRecord
private void assertReadRecord(String dbName, String collectionName, String blackList, org.bson.Document snapshotRecord, String field, String expected) throws InterruptedException - Throws:
InterruptedException
-
assertInsertRecord
private void assertInsertRecord(String blackList, org.bson.Document insertRecord, String field, String expected) throws InterruptedException - Throws:
InterruptedException
-
assertInsertRecord
private void assertInsertRecord(String dbName, String collectionName, String blackList, org.bson.Document insertRecord, String field, String expected) throws InterruptedException - Throws:
InterruptedException
-
assertUpdateRecord
private void assertUpdateRecord(String blackList, org.bson.types.ObjectId objectId, org.bson.Document snapshotRecord, org.bson.Document updateRecord, String field, FieldBlacklistIT.ExpectedUpdate expected) throws InterruptedException - Throws:
InterruptedException
-
assertUpdateRecord
private void assertUpdateRecord(String blackList, org.bson.types.ObjectId objectId, org.bson.Document snapshotRecord, org.bson.Document updateRecord, boolean doSet, String field, FieldBlacklistIT.ExpectedUpdate expected) throws InterruptedException - Throws:
InterruptedException
-
assertUpdateRecord
private void assertUpdateRecord(String dbName, String collectionName, String blackList, org.bson.types.ObjectId objectId, org.bson.Document snapshotRecord, org.bson.Document updateRecord, boolean doSet, String field, FieldBlacklistIT.ExpectedUpdate expected) throws InterruptedException - Throws:
InterruptedException
-
updateField
-