Commit 76d9b1cd authored by Andy Wilkinson's avatar Andy Wilkinson

Merge branch '2.0.x'

parents e41519b6 58aaf486
...@@ -159,6 +159,7 @@ public class ReactiveMongoClientFactory { ...@@ -159,6 +159,7 @@ public class ReactiveMongoClientFactory {
if (connection.getApplicationName() != null) { if (connection.getApplicationName() != null) {
builder.applicationName(connection.getApplicationName()); builder.applicationName(connection.getApplicationName());
} }
builder.retryWrites(connection.getRetryWrites());
return builder; return builder;
} }
......
...@@ -112,6 +112,14 @@ public class ReactiveMongoClientFactoryTests { ...@@ -112,6 +112,14 @@ public class ReactiveMongoClientFactoryTests {
assertMongoCredential(credential, "user", "secret", "test"); 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 @Test
public void uriCannotBeSetWithCredentials() { public void uriCannotBeSetWithCredentials() {
MongoProperties properties = new MongoProperties(); MongoProperties properties = new MongoProperties();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment