Class MongoDbConnectorWithConnectionStringIT

All Implemented Interfaces:
Testing

public class MongoDbConnectorWithConnectionStringIT extends AbstractMongoConnectorIT
Author:
Randall Hauch
  • Constructor Details

    • MongoDbConnectorWithConnectionStringIT

      public MongoDbConnectorWithConnectionStringIT()
  • Method Details

    • getConfig

      private Configuration getConfig(String connectionString, boolean ssl)
    • shouldMaskCredentials

      public void shouldMaskCredentials()
    • shouldConsumeAllEventsFromSingleReplicaWithMongoProtocol

      public void shouldConsumeAllEventsFromSingleReplicaWithMongoProtocol() throws InterruptedException
      Throws:
      InterruptedException
    • shouldConsumeAllEventsFromSingleReplicaWithMongoSrvProtocol

      public void shouldConsumeAllEventsFromSingleReplicaWithMongoSrvProtocol() throws InterruptedException
      Throws:
      InterruptedException
    • shouldConsumeAllEventsFromDatabase

      public void shouldConsumeAllEventsFromDatabase(String connectionString, boolean ssl) throws InterruptedException
      Throws:
      InterruptedException
    • verifyFromInitialSync

      protected void verifyFromInitialSync(org.apache.kafka.connect.source.SourceRecord record, AtomicBoolean foundLast)
    • verifyNotFromInitialSync

      protected void verifyNotFromInitialSync(org.apache.kafka.connect.source.SourceRecord record)
    • verifyCreateOperation

      protected void verifyCreateOperation(org.apache.kafka.connect.source.SourceRecord record)
    • verifyReadOperation

      protected void verifyReadOperation(org.apache.kafka.connect.source.SourceRecord record)
    • verifyDeleteOperation

      protected void verifyDeleteOperation(org.apache.kafka.connect.source.SourceRecord record)
    • verifyOperation

      protected void verifyOperation(org.apache.kafka.connect.source.SourceRecord record, Envelope.Operation expected)
    • primary

      protected io.debezium.connector.mongodb.ConnectionContext.MongoPrimary primary()
      Overrides:
      primary in class AbstractMongoConnectorIT
    • storeDocuments

      protected void storeDocuments(String dbName, String collectionName, String pathOnClasspath)
      Overrides:
      storeDocuments in class AbstractMongoConnectorIT
    • storeDocuments

      protected void storeDocuments(com.mongodb.client.MongoCollection<org.bson.Document> collection, String pathOnClasspath)
      Overrides:
      storeDocuments in class AbstractMongoConnectorIT
    • storeDocumentsInTx

      protected void storeDocumentsInTx(String dbName, String collectionName, String pathOnClasspath)
    • storeDocuments

      protected void storeDocuments(com.mongodb.client.ClientSession session, com.mongodb.client.MongoCollection<org.bson.Document> collection, String pathOnClasspath)
    • loadTestDocuments

      protected List<org.bson.Document> loadTestDocuments(String pathOnClasspath)
      Description copied from class: AbstractMongoConnectorIT
      Load test documents from the classpath.
      Overrides:
      loadTestDocuments in class AbstractMongoConnectorIT
      Parameters:
      pathOnClasspath - the path on the classpath to the file containing the documents to load
      Returns:
      list of loaded documents; never null but may contain no entries.
    • formatObjectId

      private String formatObjectId(org.bson.types.ObjectId objId)
    • toObjectId

      private org.bson.types.ObjectId toObjectId(String oid)