diff options
author | Amirsaman Memaripour <amirsaman.memaripour@10gen.com> | 2020-01-29 15:24:42 +0000 |
---|---|---|
committer | evergreen <evergreen@mongodb.com> | 2020-01-29 15:24:42 +0000 |
commit | bb57005306f9d0aeb310a33384cb0a31df3490aa (patch) | |
tree | 22faeb3e0fdec4f32468338e4fff8dd84409c456 /jstests/replsets/drop_db.js | |
parent | c331a0a4ea00253d257a4c31e1ad11752ccbdfd1 (diff) | |
download | mongo-bb57005306f9d0aeb310a33384cb0a31df3490aa.tar.gz |
Revert SERVER-45584
Diffstat (limited to 'jstests/replsets/drop_db.js')
-rw-r--r-- | jstests/replsets/drop_db.js | 19 |
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(); })(); |