diff options
author | Samy Lanka <samy.lanka@mongodb.com> | 2021-05-04 19:25:54 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2021-05-05 18:56:42 +0000 |
commit | 7fec4ca75089c4c30228b8179ef2832081b5c9fa (patch) | |
tree | 7e2de2245f2347b51113107e1219e435c5c24981 /jstests | |
parent | 1fcde377b9b43fdc2b1b868b2bfd63f4a5446963 (diff) | |
download | mongo-7fec4ca75089c4c30228b8179ef2832081b5c9fa.tar.gz |
SERVER-55706 Test that we can specify a custom write concern default via CWWC
Diffstat (limited to 'jstests')
-rw-r--r-- | jstests/replsets/libs/tags.js | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/jstests/replsets/libs/tags.js b/jstests/replsets/libs/tags.js index e5861ee0bad..bd6b7a946a7 100644 --- a/jstests/replsets/libs/tags.js +++ b/jstests/replsets/libs/tags.js @@ -306,6 +306,15 @@ var TagsTest = function(options) { assert.neq(null, result.getWriteConcernError()); assert(result.getWriteConcernError().errInfo.wtimeout); + jsTestLog('Setting custom write concern via a cluster-wide write concern'); + assert.commandWorked(primary.adminCommand({ + setDefaultRWConcern: 1, + defaultWriteConcern: {w: "3 and 4", wtimeout: ReplSetTest.kDefaultTimeoutMS} + })); + + jsTestLog('Custom write concern "3 and 4" should work'); + assert.commandWorked(primary.getDB('foo').bar.insert(doc)); + replTest.stopSet(); }; }; |