33
33
import java .util .concurrent .Executors ;
34
34
import java .util .concurrent .TimeUnit ;
35
35
36
- import static com .mongodb .ClusterFixture .getConnectionString ;
37
36
import static com .mongodb .ClusterFixture .getDefaultDatabaseName ;
38
37
import static com .mongodb .ClusterFixture .serverVersionAtLeast ;
38
+ import static com .mongodb .client .Fixture .getMongoClientSettingsBuilder ;
39
39
import static java .util .Arrays .asList ;
40
40
import static java .util .Collections .singletonList ;
41
41
import static org .junit .jupiter .api .Assertions .assertEquals ;
@@ -54,8 +54,8 @@ public void shouldCreateServerSessionOnlyAfterConnectionCheckout() throws Interr
54
54
55
55
Set <BsonDocument > lsidSet = ConcurrentHashMap .newKeySet ();
56
56
MongoCollection <Document > collection ;
57
- try (MongoClient client = getMongoClient (MongoClientSettings . builder ()
58
- . applyConnectionString ( getConnectionString () )
57
+ try (MongoClient client = getMongoClient (
58
+ getMongoClientSettingsBuilder ( )
59
59
.applyToConnectionPoolSettings (builder -> builder .maxSize (1 ))
60
60
.addCommandListener (new CommandListener () {
61
61
@ Override
@@ -79,7 +79,7 @@ public void commandStarted(final CommandStartedEvent event) {
79
79
80
80
int minLsidSetSize = Integer .MAX_VALUE ;
81
81
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
83
83
for (int i = 0 ; i < 5 ; i ++) {
84
84
// given
85
85
lsidSet .clear ();
0 commit comments