summaryrefslogtreecommitdiff
path: root/jstests/replsets/initial_sync_reset_oldest_timestamp_after_failed_attempt.js
diff options
context:
space:
mode:
authorMoustafa Maher <m.maher@10gen.com>2021-04-29 01:19:06 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2021-04-29 23:07:54 +0000
commit0d97b041970929e7e56caa42ee8837cec92d2264 (patch)
tree3508368450bd271faed556cfb298624da9cb9543 /jstests/replsets/initial_sync_reset_oldest_timestamp_after_failed_attempt.js
parent15fb9ff89f2074704735c0a8629d0013b530747b (diff)
downloadmongo-0d97b041970929e7e56caa42ee8837cec92d2264.tar.gz
SERVER-55703 Update getDefaultRWConcern
Diffstat (limited to 'jstests/replsets/initial_sync_reset_oldest_timestamp_after_failed_attempt.js')
-rw-r--r--jstests/replsets/initial_sync_reset_oldest_timestamp_after_failed_attempt.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/jstests/replsets/initial_sync_reset_oldest_timestamp_after_failed_attempt.js b/jstests/replsets/initial_sync_reset_oldest_timestamp_after_failed_attempt.js
index 8a0c58acbc1..e8d50b343e1 100644
--- a/jstests/replsets/initial_sync_reset_oldest_timestamp_after_failed_attempt.js
+++ b/jstests/replsets/initial_sync_reset_oldest_timestamp_after_failed_attempt.js
@@ -37,6 +37,11 @@ assert.commandWorked(testColl.insert({_id: 1}));
const session = primary.startSession();
const sessionDB = session.getDatabase(dbName);
const sessionColl = sessionDB.getCollection(collName);
+
+// The default WC is majority and this test can't satisfy majority writes.
+assert.commandWorked(primary.adminCommand(
+ {setDefaultRWConcern: 1, defaultWriteConcern: {w: 1}, writeConcern: {w: "majority"}}));
+
session.startTransaction();
assert.commandWorked(sessionColl.insert({_id: 2}));