Merge branch '2.0.x'
This commit is contained in:
commit
76d9b1cdbd
|
@ -159,6 +159,7 @@ public class ReactiveMongoClientFactory {
|
|||
if (connection.getApplicationName() != null) {
|
||||
builder.applicationName(connection.getApplicationName());
|
||||
}
|
||||
builder.retryWrites(connection.getRetryWrites());
|
||||
return builder;
|
||||
}
|
||||
|
||||
|
|
|
@ -112,6 +112,14 @@ public class ReactiveMongoClientFactoryTests {
|
|||
assertMongoCredential(credential, "user", "secret", "test");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void retryWritesIsPropagatedFromUri() {
|
||||
MongoProperties properties = new MongoProperties();
|
||||
properties.setUri("mongodb://localhost/test?retryWrites=true");
|
||||
MongoClient client = createMongoClient(properties);
|
||||
assertThat(client.getSettings().getRetryWrites()).isTrue();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void uriCannotBeSetWithCredentials() {
|
||||
MongoProperties properties = new MongoProperties();
|
||||
|
|
Loading…
Reference in New Issue