Package io.debezium.connector.mongodb
Class FieldExcludeListIT
- java.lang.Object
-
- io.debezium.embedded.AbstractConnectorTest
-
- io.debezium.connector.mongodb.FieldExcludeListIT
-
- All Implemented Interfaces:
Testing
public class FieldExcludeListIT extends AbstractConnectorTest
-
-
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 Configurationconfigprivate io.debezium.connector.mongodb.MongoDbTaskContextcontextprivate static StringPATCHprivate static StringSERVER_NAME-
Fields inherited from class io.debezium.embedded.AbstractConnectorTest
engine, logger, logTestName, OFFSET_STORE_PATH, pollTimeoutInMs, skipTestRule
-
-
Constructor Summary
Constructors Constructor Description FieldExcludeListIT()
-
Method Summary
-
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, startAndConsumeTillEnd, stopConnector, stopConnector, validate, waitForAvailableRecords, waitForConnectorShutdown, waitForSnapshotToBeCompleted, waitForStreamingRunning, waitForStreamingRunning, waitTimeForRecords, waitTimeForRecordsAfterNulls
-
-
-
-
Field Detail
-
SERVER_NAME
private static final String SERVER_NAME
- See Also:
- Constant Field Values
-
PATCH
private static final String PATCH
- See Also:
- Constant Field Values
-
config
private Configuration config
-
context
private io.debezium.connector.mongodb.MongoDbTaskContext context
-
-
Method Detail
-
beforeEach
public void beforeEach()
-
afterEach
public void afterEach()
-
shouldNotExcludeFieldsForEventOfOtherCollection
public void shouldNotExcludeFieldsForEventOfOtherCollection() throws InterruptedException- Throws:
InterruptedException
-
shouldExcludeFieldsForReadEvent
public void shouldExcludeFieldsForReadEvent() throws InterruptedException- Throws:
InterruptedException
-
shouldNotExcludeMissingFieldsForReadEvent
public void shouldNotExcludeMissingFieldsForReadEvent() throws InterruptedException- Throws:
InterruptedException
-
shouldExcludeNestedFieldsForReadEvent
public void shouldExcludeNestedFieldsForReadEvent() throws InterruptedException- Throws:
InterruptedException
-
shouldNotExcludeNestedMissingFieldsForReadEvent
public void shouldNotExcludeNestedMissingFieldsForReadEvent() throws InterruptedException- Throws:
InterruptedException
-
shouldExcludeFieldsForInsertEvent
public void shouldExcludeFieldsForInsertEvent() throws InterruptedException- Throws:
InterruptedException
-
shouldNotExcludeMissingFieldsForInsertEvent
public void shouldNotExcludeMissingFieldsForInsertEvent() throws InterruptedException- Throws:
InterruptedException
-
shouldExcludeNestedFieldsForInsertEvent
public void shouldExcludeNestedFieldsForInsertEvent() throws InterruptedException- Throws:
InterruptedException
-
shouldNotExcludeNestedMissingFieldsForInsertEvent
public void shouldNotExcludeNestedMissingFieldsForInsertEvent() throws InterruptedException- Throws:
InterruptedException
-
shouldExcludeFieldsForUpdateEvent
public void shouldExcludeFieldsForUpdateEvent() throws InterruptedException- Throws:
InterruptedException
-
shouldNotExcludeMissingFieldsForUpdateEvent
public void shouldNotExcludeMissingFieldsForUpdateEvent() throws InterruptedException- 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
public void shouldExcludeFieldsForSetTopLevelFieldUpdateEvent() throws InterruptedException- Throws:
InterruptedException
-
shouldExcludeFieldsForUnsetTopLevelFieldUpdateEvent
public void shouldExcludeFieldsForUnsetTopLevelFieldUpdateEvent() throws InterruptedException- 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
public void shouldExcludeFieldsForDeleteEvent() throws InterruptedException- Throws:
InterruptedException
-
shouldExcludeFieldsForDeleteTombstoneEvent
public void shouldExcludeFieldsForDeleteTombstoneEvent() throws InterruptedException- Throws:
InterruptedException
-
getConfiguration
private Configuration getConfiguration(String blackList)
-
getValue
private org.apache.kafka.connect.data.Struct getValue(org.apache.kafka.connect.source.SourceRecord record)
-
connectionErrorHandler
private BiConsumer<String,Throwable> connectionErrorHandler(int numErrorsBeforeFailing)
-
primary
private io.debezium.connector.mongodb.ConnectionContext.MongoPrimary primary()
-
storeDocuments
private void storeDocuments(String dbName, String collectionName, org.bson.Document... documents)
-
updateDocuments
private void updateDocuments(String dbName, String collectionName, org.bson.types.ObjectId objId, org.bson.Document document, boolean doSet)
-
deleteDocuments
private void deleteDocuments(String dbName, String collectionName, org.bson.types.ObjectId objId)
-
assertReadRecord
private void assertReadRecord(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
-
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
-
updateField
private String updateField()
-
-