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
68
68
SocketSettings socketSettings = SocketSettings .builder ()
69
69
.applyConnectionString (getConnectionString ())
70
70
.build ();
71
- return MongoClientSettings .builder ()
71
+ MongoClientSettings . Builder builder = MongoClientSettings .builder ()
72
72
.clusterSettings (clusterSettings )
73
73
.connectionPoolSettings (connectionPoolSettings )
74
74
.serverSettings (ServerSettings .builder ().build ())
75
- .credentialList (getConnectionString ().getCredentialList ())
76
75
.sslSettings (sslSettingsBuilder .build ())
77
76
.socketSettings (socketSettings );
77
+ if (getConnectionString ().getCredential () != null ) {
78
+ builder .credential (getConnectionString ().getCredential ());
79
+ }
80
+ return builder ;
78
81
}
79
82
80
83
public static synchronized ConnectionString getConnectionString () {
You can’t perform that action at this time.
0 commit comments