File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
driver-async/src/test/functional/com/mongodb/async/client Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -68,13 +68,16 @@ public static MongoClientSettings.Builder getMongoClientBuilderFromConnectionStr
6868 SocketSettings socketSettings = SocketSettings .builder ()
6969 .applyConnectionString (getConnectionString ())
7070 .build ();
71- return MongoClientSettings .builder ()
71+ MongoClientSettings . Builder builder = MongoClientSettings .builder ()
7272 .clusterSettings (clusterSettings )
7373 .connectionPoolSettings (connectionPoolSettings )
7474 .serverSettings (ServerSettings .builder ().build ())
75- .credentialList (getConnectionString ().getCredentialList ())
7675 .sslSettings (sslSettingsBuilder .build ())
7776 .socketSettings (socketSettings );
77+ if (getConnectionString ().getCredential () != null ) {
78+ builder .credential (getConnectionString ().getCredential ());
79+ }
80+ return builder ;
7881 }
7982
8083 public static synchronized ConnectionString getConnectionString () {
You can’t perform that action at this time.
0 commit comments