summaryrefslogtreecommitdiff
path: root/jstests/replsets/drop_db.js
diff options
context:
space:
mode:
authorAmirsaman Memaripour <amirsaman.memaripour@10gen.com>2020-01-29 15:24:42 +0000
committerevergreen <evergreen@mongodb.com>2020-01-29 15:24:42 +0000
commitbb57005306f9d0aeb310a33384cb0a31df3490aa (patch)
tree22faeb3e0fdec4f32468338e4fff8dd84409c456 /jstests/replsets/drop_db.js
parentc331a0a4ea00253d257a4c31e1ad11752ccbdfd1 (diff)
downloadmongo-bb57005306f9d0aeb310a33384cb0a31df3490aa.tar.gz
Revert SERVER-45584
Diffstat (limited to 'jstests/replsets/drop_db.js')
-rw-r--r--jstests/replsets/drop_db.js19
1 files changed, 5 insertions, 14 deletions
diff --git a/jstests/replsets/drop_db.js b/jstests/replsets/drop_db.js
index ef21c2dac4d..49ee3e04406 100644
--- a/jstests/replsets/drop_db.js
+++ b/jstests/replsets/drop_db.js
@@ -49,20 +49,11 @@ checkWriteConcern(() => assert.commandWorked(primaryDB.dropDatabase({w: 1})), (c
});
primaryDB.createCollection(collName);
-checkWriteConcern(
- () => {
- /**
- * Depending on the value for kMaxMembers, the following will return a different error code:
- * FailedToParse: if kMaxMembers < 100000
- * UnsatisfiableWriteConcern: otherwise
- */
- let result = primaryDB.dropDatabase({w: 100000});
- assert(result.code == ErrorCodes.FailedToParse ||
- result.code == ErrorCodes.UnsatisfiableWriteConcern);
- },
- (cmdObj) => {
- assert.eq(cmdObj.writeConcern, {w: 100000});
- });
+checkWriteConcern(() => assert.commandFailedWithCode(primaryDB.dropDatabase({w: 100000}),
+ ErrorCodes.UnsatisfiableWriteConcern),
+ (cmdObj) => {
+ assert.eq(cmdObj.writeConcern, {w: 100000});
+ });
rst.stopSet();
})();