@@ -9,7 +9,7 @@ import com.mongodb.client.model.changestream.FullDocumentBeforeChange
99import com.mongodb.client.model.changestream.OperationType
1010import com.mongodb.kotlin.client.coroutine.MongoClient
1111import com.mongodb.kotlin.client.coroutine.MongoCollection
12- import io.github.cdimascio.dotenv.dotenv
12+ import config.getConfig
1313import kotlinx.coroutines.delay
1414import kotlinx.coroutines.launch
1515import kotlinx.coroutines.runBlocking
@@ -27,8 +27,8 @@ import kotlin.test.*
2727internal class ChangeStreamsTest {
2828
2929 companion object {
30- private val dotenv = dotenv ()
31- private val client = MongoClient .create(dotenv[ " MONGODB_CONNECTION_URI " ] )
30+ private val config = getConfig ()
31+ private val client = MongoClient .create(config.connectionUri )
3232 val database = client.getDatabase(" censusData" )
3333
3434 @AfterAll
@@ -136,8 +136,9 @@ internal class ChangeStreamsTest {
136136
137137 }
138138
139- // NOTE: will not work with a shared M0 cluster. Must have a local cluster with a replica set or >=M10 on Atlas.
140- @Test
139+ // NOTE: Test is being ignored because it will not work with a shared M0 cluster.
140+ // Must have a local cluster with a replica set or >=M10 on Atlas to successfully run.
141+ @Ignore
141142 fun createCollectionWithPreAndPostImagesTest () = runBlocking {
142143 val collectionName = " myChangeStreamCollection"
143144 // :snippet-start: create-collection-with-pre-and-post-images
@@ -174,8 +175,9 @@ internal class ChangeStreamsTest {
174175
175176 }
176177
177- // NOTE: will not work with a shared M0 cluster. Must have a local cluster with a replica set or >=M10 on Atlas.
178- @Test
178+ // NOTE: Test is being ignored because it will not work with a shared M0 cluster.
179+ // Must have a local cluster with a replica set or >=M10 on Atlas to successfully run.
180+ @Ignore
179181 fun preImageConfigurationTest () = runBlocking {
180182 val collectionName = " myChangeStreamCollection2"
181183 val createdCollection = database.getCollection<Document >(collectionName)
0 commit comments