Skip to content

Commit 6d50aec

Browse files
committed
Apply API version to MongoClientSettings in test
JAVA-4531
1 parent c7c7787 commit 6d50aec

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

driver-sync/src/test/functional/com/mongodb/client/AbstractSessionsProseTest.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@
3333
import java.util.concurrent.Executors;
3434
import java.util.concurrent.TimeUnit;
3535

36-
import static com.mongodb.ClusterFixture.getConnectionString;
3736
import static com.mongodb.ClusterFixture.getDefaultDatabaseName;
3837
import static com.mongodb.ClusterFixture.serverVersionAtLeast;
38+
import static com.mongodb.client.Fixture.getMongoClientSettingsBuilder;
3939
import static java.util.Arrays.asList;
4040
import static java.util.Collections.singletonList;
4141
import static org.junit.jupiter.api.Assertions.assertEquals;
@@ -54,8 +54,8 @@ public void shouldCreateServerSessionOnlyAfterConnectionCheckout() throws Interr
5454

5555
Set<BsonDocument> lsidSet = ConcurrentHashMap.newKeySet();
5656
MongoCollection<Document> collection;
57-
try (MongoClient client = getMongoClient(MongoClientSettings.builder()
58-
.applyConnectionString(getConnectionString())
57+
try (MongoClient client = getMongoClient(
58+
getMongoClientSettingsBuilder()
5959
.applyToConnectionPoolSettings(builder -> builder.maxSize(1))
6060
.addCommandListener(new CommandListener() {
6161
@Override
@@ -79,7 +79,7 @@ public void commandStarted(final CommandStartedEvent event) {
7979

8080
int minLsidSetSize = Integer.MAX_VALUE;
8181

82-
// Try up to times, counting on at least one time that only one lsid will be used
82+
// Try up to five times, counting on at least one time that only one lsid will be used
8383
for (int i = 0; i < 5; i++) {
8484
// given
8585
lsidSet.clear();

0 commit comments

Comments
 (0)