summaryrefslogtreecommitdiff
path: root/jstests/core/bypass_doc_validation.js
diff options
context:
space:
mode:
authorDianna Hohensee <dianna.hohensee@10gen.com>2018-05-22 17:47:03 -0400
committerDianna Hohensee <dianna.hohensee@10gen.com>2018-05-25 12:11:06 -0400
commit4094162bbef91866fbb137f595450678fd4f6a7e (patch)
tree604c8c47a4bd62be780199872633c3718c25391c /jstests/core/bypass_doc_validation.js
parent27388b3f7795d327b9b35bb83be31c260d482884 (diff)
downloadmongo-4094162bbef91866fbb137f595450678fd4f6a7e.tar.gz
SERVER-34991 JS tests doing transaction operations must use majority writeConcern for drops
Diffstat (limited to 'jstests/core/bypass_doc_validation.js')
-rw-r--r--jstests/core/bypass_doc_validation.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/jstests/core/bypass_doc_validation.js b/jstests/core/bypass_doc_validation.js
index bfd3bc1e978..d05d20cf2ca 100644
--- a/jstests/core/bypass_doc_validation.js
+++ b/jstests/core/bypass_doc_validation.js
@@ -38,7 +38,9 @@
* 'validator', which should enforce the existence of a field "a".
*/
function runBypassDocumentValidationTest(validator) {
- coll.drop();
+ // Use majority write concern to clear the drop-pending that can cause lock conflicts with
+ // transactions.
+ coll.drop({writeConcern: {w: "majority"}});
// Insert documents into the collection that would not be valid before setting 'validator'.
assert.writeOK(coll.insert({_id: 1}));