Skip to content
Snippets Groups Projects
Commit 05baf982 authored by Jeff Yemin's avatar Jeff Yemin Committed by Robert J. Moore
Browse files

Added journal=true back into MongoDB connection string. For now, the...

Added journal=true back into MongoDB connection string.  For now, the connection string will contain both "j" and "journal", until such time as the MongoDB Java driver supports "journal".
parent d48f1ce9
No related branches found
No related tags found
No related merge requests found
......@@ -76,7 +76,8 @@ public final class OptionsSupport {
result = addUrlOption(result, "w", "1");
}
else if ("journaled".equals(writeConcernType)) {
result = addUrlOption(result, "j", "true");
result = addUrlOption(result, "journal", "true"); // this is the documented option name
result = addUrlOption(result, "j", "true"); // but keep this until MongoDB Java driver supports "journal" option
}
else if ("replica_acknowledged".equals(writeConcernType)) {
result = addUrlOption(result, "w", "2");
......
......@@ -110,7 +110,7 @@ public class OptionsSupportTest {
assertThat(
updateUrl("mongodb://locahost:27017/?foo=bar",
props("mongodb.writeConcern", "journaled")),
is("mongodb://locahost:27017/?foo=bar&j=true"));
is("mongodb://locahost:27017/?foo=bar&journal=true&j=true"));
assertThat(
updateUrl("mongodb://locahost:27017/?foo=bar",
props("mongodb.writeConcern", "replica_acknowledged")),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment