Package io.debezium.connector.mongodb
Class ShardedMongoDbConnectorIT
java.lang.Object
io.debezium.embedded.AbstractConnectorTest
io.debezium.connector.mongodb.AbstractShardedMongoConnectorIT
io.debezium.connector.mongodb.ShardedMongoDbConnectorIT
- 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 intprivate static final intprivate static final intstatic final StringFields inherited from class io.debezium.connector.mongodb.AbstractShardedMongoConnectorIT
DEFAULT_COLLECTION, DEFAULT_DATABASE, DEFAULT_SHARDING_KEY, mongoFields inherited from class io.debezium.embedded.AbstractConnectorTest
consumedLines, engine, logger, logTestName, OFFSET_STORE_PATH, pollTimeoutInMs, skipTestRule -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidconsumeAndVerifyFromInitialSync(io.debezium.connector.mongodb.MongoDbConnectorConfig.ConnectionMode connectionMode, String topic, int expectedRecords) protected voidconsumeAndVerifyNotFromInitialSync(String topic, int expectedRecords) protected voidconsumeAndVerifyNotFromInitialSync(String topic, int expectedRecords, Envelope.Operation op) protected static voidpopulateCollection(String dbName, String colName, int count) protected static voidpopulateCollection(String dbName, String colName, int startId, int count) voidshouldConsumeAllEventsFromDatabase(io.debezium.connector.mongodb.MongoDbConnectorConfig.ConnectionMode connectionMode) voidvoidprotected voidverifyFromInitialSync(org.apache.kafka.connect.source.SourceRecord record, int numOfShards, AtomicInteger lastCounter) protected voidverifyNotFromInitialSync(org.apache.kafka.connect.source.SourceRecord record) protected voidverifyOperation(org.apache.kafka.connect.source.SourceRecord record, Envelope.Operation expected) Methods inherited from class io.debezium.connector.mongodb.AbstractShardedMongoConnectorIT
afterAll, afterEach, beforeAll, beforeEach, connect, insertDocuments, insertDocumentsInTx, shardedCollection, shardedCollections, shardedDatabaseMethods 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, 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, waitForNotInitialState, waitForSnapshotToBeCompleted, waitForSnapshotToBeCompleted, waitForSnapshotWithCustomMetricsToBeCompleted, waitForStreamingRunning, waitForStreamingRunning, waitForStreamingRunning, waitForStreamingWithCustomMetricsToStart, waitTimeForRecords, waitTimeForRecordsAfterNulls
-
Field Details
-
TOPIC_PREFIX
- See Also:
-
INIT_DOCUMENT_COUNT
private static final int INIT_DOCUMENT_COUNT- See Also:
-
NEW_DOCUMENT_COUNT
private static final int NEW_DOCUMENT_COUNT- See Also:
-
STOPPED_NEW_DOCUMENT_COUNT
private static final int STOPPED_NEW_DOCUMENT_COUNT- See Also:
-
-
Constructor Details
-
ShardedMongoDbConnectorIT
public ShardedMongoDbConnectorIT()
-
-
Method Details
-
populateCollection
-
populateCollection
-
shouldConsumeAllEventsFromDatabaseWithShardedConnectionMode
public void shouldConsumeAllEventsFromDatabaseWithShardedConnectionMode() throws InterruptedException- Throws:
InterruptedException
-
shouldConsumeAllEventsFromDatabaseWithReplicaSetConnectionMode
public void shouldConsumeAllEventsFromDatabaseWithReplicaSetConnectionMode() throws InterruptedException- Throws:
InterruptedException
-
shouldConsumeAllEventsFromDatabase
public void shouldConsumeAllEventsFromDatabase(io.debezium.connector.mongodb.MongoDbConnectorConfig.ConnectionMode connectionMode) throws InterruptedException - Throws:
InterruptedException
-
consumeAndVerifyFromInitialSync
protected void consumeAndVerifyFromInitialSync(io.debezium.connector.mongodb.MongoDbConnectorConfig.ConnectionMode connectionMode, String topic, int expectedRecords) throws InterruptedException - Throws:
InterruptedException
-
verifyFromInitialSync
protected void verifyFromInitialSync(org.apache.kafka.connect.source.SourceRecord record, int numOfShards, AtomicInteger lastCounter) -
consumeAndVerifyNotFromInitialSync
protected void consumeAndVerifyNotFromInitialSync(String topic, int expectedRecords) throws InterruptedException - Throws:
InterruptedException
-
consumeAndVerifyNotFromInitialSync
protected void consumeAndVerifyNotFromInitialSync(String topic, int expectedRecords, Envelope.Operation op) throws InterruptedException - Throws:
InterruptedException
-
verifyNotFromInitialSync
protected void verifyNotFromInitialSync(org.apache.kafka.connect.source.SourceRecord record) -
verifyOperation
protected void verifyOperation(org.apache.kafka.connect.source.SourceRecord record, Envelope.Operation expected)
-