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, isEngineRunning, logger, logTestName, OFFSET_STORE_PATH, pollTimeoutInMs, skipTestRule -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidconsumeAndVerifyFromInitialSnapshot(String topic, int expectedRecords) protected voidconsumeAndVerifyNotFromInitialSnapshot(String topic, int expectedRecords) protected voidconsumeAndVerifyNotFromInitialSnapshot(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) voidprotected voidverifyFromInitialSnapshot(org.apache.kafka.connect.source.SourceRecord record, int numOfShards, AtomicInteger lastCounter) Methods inherited from class io.debezium.connector.mongodb.AbstractShardedMongoConnectorIT
afterAll, afterEach, beforeAll, beforeEach, connect, connect, insertDocuments, insertDocumentsInTx, shardedCollection, shardedCollections, shardedDatabase, verifyFromInitialSnapshot, verifyNotFromInitialSnapshot, verifyOperationMethods 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, 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, storeOffsets, validate, waitForAvailableRecords, waitForConnectorShutdown, waitForEngineShutdown, waitForSnapshotToBeCompleted, waitForSnapshotToBeCompleted, waitForSnapshotWithCustomMetricsToBeCompleted, waitForStreamingRunning, waitForStreamingRunning, waitForStreamingRunning, waitForStreamingWithCustomMetricsToStart, waitTimeForEngine, 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
-
shouldConsumeAllEventsFromDatabase
- Throws:
InterruptedException
-
consumeAndVerifyFromInitialSnapshot
protected void consumeAndVerifyFromInitialSnapshot(String topic, int expectedRecords) throws InterruptedException - Throws:
InterruptedException
-
verifyFromInitialSnapshot
protected void verifyFromInitialSnapshot(org.apache.kafka.connect.source.SourceRecord record, int numOfShards, AtomicInteger lastCounter) -
consumeAndVerifyNotFromInitialSnapshot
protected void consumeAndVerifyNotFromInitialSnapshot(String topic, int expectedRecords) throws InterruptedException - Throws:
InterruptedException
-
consumeAndVerifyNotFromInitialSnapshot
protected void consumeAndVerifyNotFromInitialSnapshot(String topic, int expectedRecords, Envelope.Operation op) throws InterruptedException - Throws:
InterruptedException
-