Class MongoDbReplicaSetTest

java.lang.Object
io.debezium.testing.testcontainers.MongoDbReplicaSetTest

public class MongoDbReplicaSetTest extends Object
See Also:
  • Field Details

    • LOGGER

      private static final org.slf4j.Logger LOGGER
    • MONGO_DOCKER_DESKTOP_PORT_PROPERTY

      public static final String MONGO_DOCKER_DESKTOP_PORT_PROPERTY
      See Also:
  • Constructor Details

    • MongoDbReplicaSetTest

      public MongoDbReplicaSetTest()
  • Method Details

    • setupAll

      @BeforeAll static void setupAll()
    • tearDownAll

      @AfterAll static void tearDownAll()
    • tearDown

      @AfterEach void tearDown()
    • testCluster

      @Test public void testCluster() throws InterruptedException
      Throws:
      InterruptedException
    • testClusterWithPropertyPortList

      @EnabledOnOs({MAC,WINDOWS}) @Test public void testClusterWithPropertyPortList() throws InterruptedException
      Throws:
      InterruptedException
    • testClusterWithPropertyPorRange

      @EnabledOnOs({MAC,WINDOWS}) @Test public void testClusterWithPropertyPorRange() throws InterruptedException
      Throws:
      InterruptedException
    • testClusterWithInsufficientNumberOfPorts

      @EnabledOnOs({MAC,WINDOWS}) @Test public void testClusterWithInsufficientNumberOfPorts() throws InterruptedException
      Throws:
      InterruptedException
    • testCluster

      public void testCluster(io.debezium.testing.testcontainers.MongoDbReplicaSet.Builder replicaSet) throws InterruptedException
      Throws:
      InterruptedException
    • run

      private void run(io.debezium.testing.testcontainers.MongoDbReplicaSet cluster, com.mongodb.client.MongoClient client, com.mongodb.client.MongoCollection<org.bson.Document> collection)
    • isSelectedReadPreference

      private static boolean isSelectedReadPreference(com.mongodb.client.MongoClient client, com.mongodb.client.MongoCollection<org.bson.Document> collection, com.mongodb.client.MongoChangeStreamCursor<com.mongodb.client.model.changestream.ChangeStreamDocument<org.bson.Document>> cursor)
    • setup

      private static com.mongodb.client.MongoCollection<org.bson.Document> setup(com.mongodb.client.MongoClient mongoClient) throws InterruptedException
      Throws:
      InterruptedException