diff options
author | Shreyas Kalyan <shreyas.kalyan@10gen.com> | 2021-01-27 14:29:58 -0800 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2021-02-02 03:58:02 +0000 |
commit | f14dd6bfe5144612dbcd66986cda7b068cf886ef (patch) | |
tree | e51f22542027ef15b7000d835932cad0f82e6c03 /jstests/sharding/write_concern_basic.js | |
parent | 3615d707c495af3019344dc8878259ff362607d1 (diff) | |
download | mongo-f14dd6bfe5144612dbcd66986cda7b068cf886ef.tar.gz |
SERVER-53785 Test WriteConcernErrors are preserved with the mongos implementation of drop command
Diffstat (limited to 'jstests/sharding/write_concern_basic.js')
-rw-r--r-- | jstests/sharding/write_concern_basic.js | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/jstests/sharding/write_concern_basic.js b/jstests/sharding/write_concern_basic.js new file mode 100644 index 00000000000..ae27edad6cd --- /dev/null +++ b/jstests/sharding/write_concern_basic.js @@ -0,0 +1,20 @@ +// Test that certain basic commands preserve write concern errors. +// @tags: [ requires_fcv_49, ] +// + +(function() { +"use strict"; + +load("jstests/sharding/libs/failpoint_helpers.js"); + +let st = new ShardingTest({shards: 1, config: 1}); + +{ + let db = st.s.getDB("test"); + failCommandsWithWriteConcernError(st.rs0, ["drop", "_shardsvrDropCollectionParticipant"]); + assert.commandWorked(db.collection.insert({"a": 1})); + assert.commandFailedWithCode(db.runCommand({drop: "collection"}), 12345); +} + +st.stop(); +})();
\ No newline at end of file |