Package io.debezium.connector.mongodb
Class AbstractShardedMongoConnectorIT
java.lang.Object
io.debezium.embedded.AbstractConnectorTest
io.debezium.connector.mongodb.AbstractShardedMongoConnectorIT
- All Implemented Interfaces:
Testing
- Direct Known Subclasses:
ShardedIncrementalSnapshotIT,ShardedMongoDbConnectorIT
-
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 TypeFieldDescriptionprotected static final Stringprotected static final Stringprotected static final Stringprotected static MongoDbShardedClusterFields inherited from class io.debezium.embedded.AbstractConnectorTest
consumedLines, engine, logger, logTestName, OFFSET_STORE_PATH, pollTimeoutInMs, skipTestRule -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidafterAll()voidstatic voidvoidprivate static booleancollectionExists(com.mongodb.client.MongoDatabase database, String collectionName) protected static com.mongodb.client.MongoClientconnect()protected voidinsertDocuments(String dbName, String collectionName, org.bson.Document... documents) Inserts all documents in the specified collection.protected voidinsertDocumentsInTx(String dbName, String collectionName, org.bson.Document... documents) Inserts all documents in the specified collection within a transaction.protected Stringprotected StringMethods 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, 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
-
DEFAULT_DATABASE
- See Also:
-
DEFAULT_COLLECTION
- See Also:
-
DEFAULT_SHARDING_KEY
- See Also:
-
mongo
-
-
Constructor Details
-
AbstractShardedMongoConnectorIT
public AbstractShardedMongoConnectorIT()
-
-
Method Details
-
connect
protected static com.mongodb.client.MongoClient connect() -
beforeAll
public static void beforeAll() -
afterAll
public static void afterAll() -
beforeEach
public void beforeEach() -
afterEach
public void afterEach() -
shardedDatabase
-
shardedCollections
-
shardedCollection
-
insertDocuments
protected void insertDocuments(String dbName, String collectionName, org.bson.Document... documents) Inserts all documents in the specified collection.- Parameters:
dbName- the database namecollectionName- the collection namedocuments- the documents to be inserted, can be empty
-
insertDocumentsInTx
protected void insertDocumentsInTx(String dbName, String collectionName, org.bson.Document... documents) Inserts all documents in the specified collection within a transaction.- Parameters:
dbName- the database namecollectionName- the collection namedocuments- the documents to be inserted, can be empty
-
collectionExists
private static boolean collectionExists(com.mongodb.client.MongoDatabase database, String collectionName)
-