From 35b5b72146ca570b5c6fed8aaa7e891edf7d6a78 Mon Sep 17 00:00:00 2001 From: Max Hirschhorn Date: Tue, 30 Jan 2018 19:45:42 -0500 Subject: SERVER-32522 Clean up {read,write}Concern and readPreference overrides. Introduces OverrideHelpers object with convenience methods for inspecting certain aggregation and map-reduce commands, as well as overriding startParallelShell(), Mongo.prototype.runCommand(), and Mongo.prototype.runCommandWithMetadata(). Also removes a number of tests that were incorrectly blacklisted from the read_concern_majority_passthrough.yml and read_concern_linearizable_passthrough.yml test suites. --- jstests/core/batch_write_command_delete.js | 7 ++++++- jstests/core/batch_write_command_insert.js | 6 +++++- jstests/core/batch_write_command_update.js | 6 +++++- jstests/core/collection_info_cache_race.js | 4 ++-- .../core/commands_that_do_not_write_do_not_accept_wc.js | 7 +++++-- jstests/core/constructors.js | 8 ++++++-- jstests/core/crud_api.js | 6 +++++- jstests/core/dropdb_race.js | 7 +++++-- jstests/core/error2.js | 6 ++++-- jstests/core/eval0.js | 5 ++++- jstests/core/eval1.js | 10 +++++++--- jstests/core/eval3.js | 10 +++++++--- jstests/core/eval4.js | 12 ++++++++---- jstests/core/eval5.js | 10 +++++++--- jstests/core/eval6.js | 10 +++++++--- jstests/core/eval7.js | 5 ++++- jstests/core/eval9.js | 10 +++++++--- jstests/core/eval_mr.js | 14 +++++++++----- jstests/core/eval_nolock.js | 10 +++++++--- jstests/core/evala.js | 10 +++++++--- jstests/core/evalb.js | 8 ++++++-- jstests/core/evald.js | 12 ++++++++---- jstests/core/evale.js | 10 +++++++--- jstests/core/evalg.js | 12 ++++++++---- jstests/core/evalh.js | 7 +++++-- jstests/core/evalj.js | 5 ++++- jstests/core/explain_agg_write_concern.js | 9 +++++++-- jstests/core/fsync.js | 2 ++ jstests/core/geo_update_btree.js | 7 +++++-- jstests/core/js3.js | 10 +++++++--- jstests/core/js7.js | 5 ++++- jstests/core/js9.js | 10 +++++++--- jstests/core/json_schema/misc_validation.js | 8 ++++++-- jstests/core/profile_insert.js | 7 +++++-- jstests/core/recursion.js | 12 ++++++++---- jstests/core/regex_not_id.js | 6 +++--- jstests/core/remove8.js | 12 ++++++++---- jstests/core/rename4.js | 5 ++++- jstests/core/shell_writeconcern.js | 6 +++++- jstests/core/stages_delete.js | 7 ++++++- jstests/core/storefunc.js | 6 +++++- jstests/core/update_multi5.js | 4 ++-- jstests/core/write_result.js | 7 ++++++- 43 files changed, 245 insertions(+), 95 deletions(-) (limited to 'jstests/core') diff --git a/jstests/core/batch_write_command_delete.js b/jstests/core/batch_write_command_delete.js index 85098662d6c..37a65750524 100644 --- a/jstests/core/batch_write_command_delete.js +++ b/jstests/core/batch_write_command_delete.js @@ -1,7 +1,12 @@ // Cannot implicitly shard accessed collections because of following errmsg: A single // update/delete on a sharded collection must contain an exact match on _id or contain the shard // key. -// @tags: [assumes_unsharded_collection, requires_non_retryable_writes] +// +// @tags: [ +// assumes_unsharded_collection, +// assumes_write_concern_unchanged, +// requires_non_retryable_writes, +// ] // // Ensures that mongod respects the batch write protocols for delete diff --git a/jstests/core/batch_write_command_insert.js b/jstests/core/batch_write_command_insert.js index cf2907c0675..962a4eb37ad 100644 --- a/jstests/core/batch_write_command_insert.js +++ b/jstests/core/batch_write_command_insert.js @@ -1,6 +1,10 @@ // Cannot implicitly shard accessed collections because of not being able to create unique index // using hashed shard key pattern. -// @tags: [cannot_create_unique_index_when_using_hashed_shard_key] +// +// @tags: [ +// assumes_write_concern_unchanged, +// cannot_create_unique_index_when_using_hashed_shard_key, +// ] // // Ensures that mongod respects the batch write protocol for inserts diff --git a/jstests/core/batch_write_command_update.js b/jstests/core/batch_write_command_update.js index 8a37d77067e..24f86256d98 100644 --- a/jstests/core/batch_write_command_update.js +++ b/jstests/core/batch_write_command_update.js @@ -1,7 +1,11 @@ // Cannot implicitly shard accessed collections because of following errmsg: A single // update/delete on a sharded collection must contain an exact match on _id or contain the shard // key. -// @tags: [assumes_unsharded_collection, requires_non_retryable_writes] +// @tags: [ +// assumes_unsharded_collection, +// assumes_write_concern_unchanged, +// requires_non_retryable_writes, +// ] // // Ensures that mongod respects the batch write protocols for updates diff --git a/jstests/core/collection_info_cache_race.js b/jstests/core/collection_info_cache_race.js index d57fc3340db..8fcde050e99 100644 --- a/jstests/core/collection_info_cache_race.js +++ b/jstests/core/collection_info_cache_race.js @@ -5,9 +5,9 @@ var coll = db.collection_info_cache_race; coll.drop(); assert.commandWorked(db.createCollection(coll.getName(), {autoIndexId: false})); // Fails when SERVER-16502 was not fixed, due to invariant -assert.writeOK(coll.save({_id: false}, {writeConcern: {w: 1}})); +assert.writeOK(coll.save({_id: false})); coll.drop(); assert.commandWorked(db.createCollection(coll.getName(), {autoIndexId: false})); assert.eq(null, coll.findOne()); -assert.writeOK(coll.save({_id: false}, {writeConcern: {w: 1}})); +assert.writeOK(coll.save({_id: false})); diff --git a/jstests/core/commands_that_do_not_write_do_not_accept_wc.js b/jstests/core/commands_that_do_not_write_do_not_accept_wc.js index a87a38d8ae4..e2e4e55a51b 100644 --- a/jstests/core/commands_that_do_not_write_do_not_accept_wc.js +++ b/jstests/core/commands_that_do_not_write_do_not_accept_wc.js @@ -1,9 +1,12 @@ -// @tags: [does_not_support_stepdowns] - /** * This file tests commands that do not support write concern. It passes both valid and invalid * writeConcern fields to commands and expects the commands to fail with a writeConcernNotSupported * error. + * + * @tags: [ + * assumes_write_concern_unchanged, + * does_not_support_stepdowns, + * ] */ (function() { diff --git a/jstests/core/constructors.js b/jstests/core/constructors.js index 52ce8f04065..4d6f8b498cc 100644 --- a/jstests/core/constructors.js +++ b/jstests/core/constructors.js @@ -1,6 +1,10 @@ -// @tags: [does_not_support_stepdowns, requires_non_retryable_commands] - // Tests to see what validity checks are done for 10gen specific object construction +// +// @tags: [ +// does_not_support_stepdowns, +// requires_eval_command, +// requires_non_retryable_commands, +// ] // Takes a list of constructors and returns a new list with an extra entry for each constructor with // "new" prepended diff --git a/jstests/core/crud_api.js b/jstests/core/crud_api.js index abf40389a43..3a1f7418305 100644 --- a/jstests/core/crud_api.js +++ b/jstests/core/crud_api.js @@ -1,7 +1,11 @@ // Cannot implicitly shard accessed collections because of following errmsg: A single // update/delete on a sharded collection must contain an exact match on _id or contain the shard // key. -// @tags: [assumes_unsharded_collection] +// +// @tags: [ +// assumes_unsharded_collection, +// assumes_write_concern_unchanged, +// ] (function() { "use strict"; diff --git a/jstests/core/dropdb_race.js b/jstests/core/dropdb_race.js index 9366df68a9b..40557dc8551 100644 --- a/jstests/core/dropdb_race.js +++ b/jstests/core/dropdb_race.js @@ -1,6 +1,9 @@ -// @tags: [does_not_support_stepdowns] - // test dropping a db with simultaneous commits +// +// @tags: [ +// assumes_write_concern_unchanged, +// does_not_support_stepdowns, +// ] m = db.getMongo(); baseName = "jstests_dur_droprace"; diff --git a/jstests/core/error2.js b/jstests/core/error2.js index 7c26f5688d7..6674d5663c6 100644 --- a/jstests/core/error2.js +++ b/jstests/core/error2.js @@ -1,6 +1,8 @@ -// @tags: [requires_non_retryable_commands] - // Test that client gets stack trace on failed invoke +// @tags: [ +// requires_eval_command, +// requires_non_retryable_commands, +// ] f = db.jstests_error2; diff --git a/jstests/core/eval0.js b/jstests/core/eval0.js index 4592f3c9d60..7e075feb2d5 100644 --- a/jstests/core/eval0.js +++ b/jstests/core/eval0.js @@ -1,4 +1,7 @@ -// @tags: [requires_non_retryable_commands] +// @tags: [ +// requires_eval_command, +// requires_non_retryable_commands, +// ] assert.writeOK(db.evalprep.insert({}), "db must exist for eval to succeed"); db.evalprep.drop(); diff --git a/jstests/core/eval1.js b/jstests/core/eval1.js index a18b6176c5c..fca8ef7c0ec 100644 --- a/jstests/core/eval1.js +++ b/jstests/core/eval1.js @@ -1,6 +1,10 @@ -// Cannot implicitly shard accessed collections because unsupported use of sharded collection -// from db.eval. -// @tags: [assumes_unsharded_collection, requires_non_retryable_commands] +// @tags: [ +// # Cannot implicitly shard accessed collections because unsupported use of sharded collection +// # from db.eval. +// assumes_unsharded_collection, +// requires_eval_command, +// requires_non_retryable_commands, +// ] t = db.eval1; t.drop(); diff --git a/jstests/core/eval3.js b/jstests/core/eval3.js index eacb6d70203..6c5e8b7c56d 100644 --- a/jstests/core/eval3.js +++ b/jstests/core/eval3.js @@ -1,6 +1,10 @@ -// Cannot implicitly shard accessed collections because unsupported use of sharded collection -// from db.eval. -// @tags: [assumes_unsharded_collection, requires_non_retryable_commands] +// @tags: [ +// # Cannot implicitly shard accessed collections because unsupported use of sharded collection +// # from db.eval. +// assumes_unsharded_collection, +// requires_eval_command, +// requires_non_retryable_commands, +// ] t = db.eval3; t.drop(); diff --git a/jstests/core/eval4.js b/jstests/core/eval4.js index b7d19a4ac3b..74d25b10184 100644 --- a/jstests/core/eval4.js +++ b/jstests/core/eval4.js @@ -1,7 +1,11 @@ -// Cannot implicitly shard accessed collections because unsupported use of sharded collection -// from db.eval. -// @tags: [assumes_unsharded_collection, requires_non_retryable_commands, -// requires_non_retryable_writes] +// @tags: [ +// # Cannot implicitly shard accessed collections because unsupported use of sharded collection +// # from db.eval. +// assumes_unsharded_collection, +// requires_eval_command, +// requires_non_retryable_commands, +// requires_non_retryable_writes, +// ] t = db.eval4; t.drop(); diff --git a/jstests/core/eval5.js b/jstests/core/eval5.js index fc495d86403..f3d30c49779 100644 --- a/jstests/core/eval5.js +++ b/jstests/core/eval5.js @@ -1,6 +1,10 @@ -// Cannot implicitly shard accessed collections because unsupported use of sharded collection -// from db.eval. -// @tags: [assumes_unsharded_collection, requires_non_retryable_commands] +// @tags: [ +// # Cannot implicitly shard accessed collections because unsupported use of sharded collection +// # from db.eval. +// assumes_unsharded_collection, +// requires_eval_command, +// requires_non_retryable_commands, +// ] t = db.eval5; t.drop(); diff --git a/jstests/core/eval6.js b/jstests/core/eval6.js index 751bdbf9e34..d8ad52e95d5 100644 --- a/jstests/core/eval6.js +++ b/jstests/core/eval6.js @@ -1,6 +1,10 @@ -// Cannot implicitly shard accessed collections because unsupported use of sharded collection -// from db.eval. -// @tags: [assumes_unsharded_collection, requires_non_retryable_commands] +// @tags: [ +// # Cannot implicitly shard accessed collections because unsupported use of sharded collection +// # from db.eval. +// assumes_unsharded_collection, +// requires_eval_command, +// requires_non_retryable_commands, +// ] t = db.eval6; t.drop(); diff --git a/jstests/core/eval7.js b/jstests/core/eval7.js index 32c37139e53..751779dba29 100644 --- a/jstests/core/eval7.js +++ b/jstests/core/eval7.js @@ -1,4 +1,7 @@ -// @tags: [requires_non_retryable_commands] +// @tags: [ +// requires_eval_command, +// requires_non_retryable_commands, +// ] assert.writeOK(db.evalprep.insert({}), "db must exist for eval to succeed"); db.evalprep.drop(); diff --git a/jstests/core/eval9.js b/jstests/core/eval9.js index 2f015b46485..ce6f909dd2f 100644 --- a/jstests/core/eval9.js +++ b/jstests/core/eval9.js @@ -1,6 +1,10 @@ -// Cannot implicitly shard accessed collections because unsupported use of sharded collection -// from db.eval. -// @tags: [assumes_unsharded_collection, requires_non_retryable_commands] +// @tags: [ +// # Cannot implicitly shard accessed collections because unsupported use of sharded collection +// # from db.eval. +// assumes_unsharded_collection, +// requires_eval_command, +// requires_non_retryable_commands, +// ] assert.writeOK(db.evalprep.insert({}), "db must exist for eval to succeed"); db.evalprep.drop(); diff --git a/jstests/core/eval_mr.js b/jstests/core/eval_mr.js index 9c3ac3c7efe..33b56039321 100644 --- a/jstests/core/eval_mr.js +++ b/jstests/core/eval_mr.js @@ -1,9 +1,13 @@ -// Cannot implicitly shard accessed collections because of following errmsg: Cannot output to a -// non-sharded collection because sharded collection exists already. -// @tags: [assumes_unsharded_collection, does_not_support_stepdowns, -// requires_non_retryable_commands] - // Test that the eval command can't be used to invoke the mapReduce command. SERVER-17889. +// +// @tags: [ +// # Cannot implicitly shard accessed collections because of following errmsg: Cannot output to a +// # non-sharded collection because sharded collection exists already. +// assumes_unsharded_collection, +// does_not_support_stepdowns, +// requires_eval_command, +// requires_non_retryable_commands, +// ] (function() { "use strict"; db.eval_mr.drop(); diff --git a/jstests/core/eval_nolock.js b/jstests/core/eval_nolock.js index 8ae7f41f815..8ff0738110e 100644 --- a/jstests/core/eval_nolock.js +++ b/jstests/core/eval_nolock.js @@ -1,6 +1,10 @@ -// Cannot implicitly shard accessed collections because unsupported use of sharded collection -// from db.eval. -// @tags: [assumes_unsharded_collection, requires_non_retryable_commands] +// @tags: [ +// # Cannot implicitly shard accessed collections because unsupported use of sharded collection +// # from db.eval. +// assumes_unsharded_collection, +// requires_eval_command, +// requires_non_retryable_commands, +// ] t = db.eval_nolock; t.drop(); diff --git a/jstests/core/evala.js b/jstests/core/evala.js index 00c2b548636..2d3187fdcc1 100644 --- a/jstests/core/evala.js +++ b/jstests/core/evala.js @@ -1,6 +1,10 @@ -// Cannot implicitly shard accessed collections because unsupported use of sharded collection -// from db.eval. -// @tags: [assumes_unsharded_collection, requires_non_retryable_commands] +// @tags: [ +// # Cannot implicitly shard accessed collections because unsupported use of sharded collection +// # from db.eval. +// assumes_unsharded_collection, +// requires_eval_command, +// requires_non_retryable_commands, +// ] t = db.evala; t.drop(); diff --git a/jstests/core/evalb.js b/jstests/core/evalb.js index a3d9251af57..d92573eef1c 100644 --- a/jstests/core/evalb.js +++ b/jstests/core/evalb.js @@ -1,7 +1,11 @@ -// @tags: [does_not_support_stepdowns, requires_non_retryable_commands] - // Check the return value of a db.eval function running a database query, and ensure the function's // contents are logged in the profile log. +// +// @tags: [ +// does_not_support_stepdowns, +// requires_eval_command, +// requires_non_retryable_commands, +// ] // Use a reserved database name to avoid a conflict in the parallel test suite. var stddb = db; diff --git a/jstests/core/evald.js b/jstests/core/evald.js index b4317c4a24a..bb81d08dfb0 100644 --- a/jstests/core/evald.js +++ b/jstests/core/evald.js @@ -1,7 +1,11 @@ -// Cannot implicitly shard accessed collections because unsupported use of sharded collection -// from db.eval. -// @tags: [assumes_unsharded_collection, does_not_support_stepdowns, -// requires_non_retryable_commands] +// @tags: [ +// # Cannot implicitly shard accessed collections because unsupported use of sharded collection +// # from db.eval. +// assumes_unsharded_collection, +// does_not_support_stepdowns, +// requires_eval_command, +// requires_non_retryable_commands, +// ] t = db.jstests_evald; t.drop(); diff --git a/jstests/core/evale.js b/jstests/core/evale.js index 8e20ee5177e..659b83fd339 100644 --- a/jstests/core/evale.js +++ b/jstests/core/evale.js @@ -1,6 +1,10 @@ -// Cannot implicitly shard accessed collections because unsupported use of sharded collection -// from db.eval. -// @tags: [assumes_unsharded_collection, requires_non_retryable_commands] +// @tags: [ +// # Cannot implicitly shard accessed collections because unsupported use of sharded collection +// # from db.eval. +// assumes_unsharded_collection, +// requires_eval_command, +// requires_non_retryable_commands, +// ] t = db.jstests_evale; t.drop(); diff --git a/jstests/core/evalg.js b/jstests/core/evalg.js index dcb5b98f000..536fdcadb81 100644 --- a/jstests/core/evalg.js +++ b/jstests/core/evalg.js @@ -1,8 +1,12 @@ -// Cannot implicitly shard accessed collections because unsupported use of sharded collection -// from db.eval. -// @tags: [assumes_unsharded_collection, requires_non_retryable_commands] - // SERVER-17499: Test behavior of getMore on aggregation cursor under eval command. +// +// @tags: [ +// # Cannot implicitly shard accessed collections because unsupported use of sharded collection +// # from db.eval. +// assumes_unsharded_collection, +// requires_eval_command, +// requires_non_retryable_commands, +// ] db.evalg.drop(); for (var i = 0; i < 102; ++i) { db.evalg.insert({}); diff --git a/jstests/core/evalh.js b/jstests/core/evalh.js index 3881c92be80..31ea47ce891 100644 --- a/jstests/core/evalh.js +++ b/jstests/core/evalh.js @@ -1,7 +1,10 @@ -// @tags: [requires_non_retryable_commands] - /** * Test that db.eval does not support auth. + * + * @tags: [ + * requires_eval_command, + * requires_non_retryable_commands, + * ] */ (function() { 'use strict'; diff --git a/jstests/core/evalj.js b/jstests/core/evalj.js index fa5e3305501..e58adf3c040 100644 --- a/jstests/core/evalj.js +++ b/jstests/core/evalj.js @@ -1,4 +1,7 @@ -// @tags: [requires_non_retryable_commands] +// @tags: [ +// requires_eval_command, +// requires_non_retryable_commands, +// ] (function() { "use strict"; diff --git a/jstests/core/explain_agg_write_concern.js b/jstests/core/explain_agg_write_concern.js index e007eb5d6d3..84f83cb0755 100644 --- a/jstests/core/explain_agg_write_concern.js +++ b/jstests/core/explain_agg_write_concern.js @@ -1,7 +1,12 @@ // Cannot implicitly shard accessed collections because unsupported use of sharded collection // for output collection of aggregation pipeline. -// @tags: [assumes_unsharded_collection, does_not_support_stepdowns, -// requires_non_retryable_commands] +// +// @tags: [ +// assumes_unsharded_collection, +// assumes_write_concern_unchanged, +// does_not_support_stepdowns, +// requires_non_retryable_commands, +// ] /** * Tests related to the aggregate commands behavior with writeConcern and writeConcern + explain. diff --git a/jstests/core/fsync.js b/jstests/core/fsync.js index 9e472dc640f..c5ba3fe13a0 100644 --- a/jstests/core/fsync.js +++ b/jstests/core/fsync.js @@ -6,6 +6,8 @@ * - Confirm that writes can progress after fsyncUnlock * - Confirm that the command can be run repeatedly without breaking things * - Confirm that the pseudo commands and eval can perform fsyncLock/Unlock + * + * @tags: [requires_eval_command] */ (function() { "use strict"; diff --git a/jstests/core/geo_update_btree.js b/jstests/core/geo_update_btree.js index d40c5ad8719..6aa12733654 100644 --- a/jstests/core/geo_update_btree.js +++ b/jstests/core/geo_update_btree.js @@ -1,6 +1,9 @@ -// @tags: [requires_non_retryable_writes] - // Tests whether the geospatial search is stable under btree updates +// +// @tags: [ +// assumes_write_concern_unchanged, +// requires_non_retryable_writes, +// ] var coll = db.getCollection("jstests_geo_update_btree"); coll.drop(); diff --git a/jstests/core/js3.js b/jstests/core/js3.js index db7668243a3..d22a579141b 100644 --- a/jstests/core/js3.js +++ b/jstests/core/js3.js @@ -1,6 +1,10 @@ -// Cannot implicitly shard accessed collections because unsupported use of sharded collection -// from db.eval. -// @tags: [assumes_unsharded_collection, requires_non_retryable_commands] +// @tags: [ +// # Cannot implicitly shard accessed collections because unsupported use of sharded collection +// # from db.eval. +// assumes_unsharded_collection, +// requires_eval_command, +// requires_non_retryable_commands, +// ] t = db.jstests_js3; diff --git a/jstests/core/js7.js b/jstests/core/js7.js index 78a84cafa95..a9f0f703c30 100644 --- a/jstests/core/js7.js +++ b/jstests/core/js7.js @@ -1,4 +1,7 @@ -// @tags: [requires_non_retryable_commands] +// @tags: [ +// requires_eval_command, +// requires_non_retryable_commands, +// ] t = db.jstests_js7; t.drop(); diff --git a/jstests/core/js9.js b/jstests/core/js9.js index c26c3544eb3..fdeb2615944 100644 --- a/jstests/core/js9.js +++ b/jstests/core/js9.js @@ -1,6 +1,10 @@ -// Cannot implicitly shard accessed collections because unsupported use of sharded collection -// from db.eval. -// @tags: [assumes_unsharded_collection, requires_non_retryable_commands] +// @tags: [ +// # Cannot implicitly shard accessed collections because unsupported use of sharded collection +// # from db.eval. +// assumes_unsharded_collection, +// requires_eval_command, +// requires_non_retryable_commands, +// ] c = db.jstests_js9; c.drop(); diff --git a/jstests/core/json_schema/misc_validation.js b/jstests/core/json_schema/misc_validation.js index 2e6a0eed6b0..d003e9af7ca 100644 --- a/jstests/core/json_schema/misc_validation.js +++ b/jstests/core/json_schema/misc_validation.js @@ -13,8 +13,12 @@ * - doTxn * - $elemMatch projection * - * @tags: [assumes_no_implicit_collection_creation_after_drop, requires_non_retryable_commands, - * requires_non_retryable_writes] + * @tags: [ + * assumes_no_implicit_collection_creation_after_drop, + * requires_eval_command, + * requires_non_retryable_commands, + * requires_non_retryable_writes, + * ] */ (function() { "use strict"; diff --git a/jstests/core/profile_insert.js b/jstests/core/profile_insert.js index 41d1b4e9b03..6c32162701c 100644 --- a/jstests/core/profile_insert.js +++ b/jstests/core/profile_insert.js @@ -1,6 +1,9 @@ -// @tags: [does_not_support_stepdowns] - // Confirms that profiled insert execution contains all expected metrics with proper values. +// +// @tags: [ +// assumes_write_concern_unchanged, +// does_not_support_stepdowns, +// ] (function() { "use strict"; diff --git a/jstests/core/recursion.js b/jstests/core/recursion.js index 4a0488a723d..0114b72515c 100644 --- a/jstests/core/recursion.js +++ b/jstests/core/recursion.js @@ -1,7 +1,11 @@ -// @tags: [does_not_support_stepdowns, requires_non_retryable_commands] - -// Basic tests for a form of stack recursion that's been shown to cause C++ -// side stack overflows in the past. See SERVER-19614. +// Basic tests for a form of stack recursion that's been shown to cause C++ side stack overflows in +// the past. See SERVER-19614. +// +// @tags: [ +// does_not_support_stepdowns, +// requires_eval_command, +// requires_non_retryable_commands, +// ] (function() { "use strict"; diff --git a/jstests/core/regex_not_id.js b/jstests/core/regex_not_id.js index 1f15250f240..35b2c858867 100644 --- a/jstests/core/regex_not_id.js +++ b/jstests/core/regex_not_id.js @@ -3,10 +3,10 @@ var testColl = db.regex_not_id; testColl.drop(); -assert.writeOK(testColl.insert({_id: "ABCDEF1"}, {writeConcern: {w: 1}})); +assert.writeOK(testColl.insert({_id: "ABCDEF1"})); // Should be an error. -assert.writeError(testColl.insert({_id: /^A/}, {writeConcern: {w: 1}})); +assert.writeError(testColl.insert({_id: /^A/})); // _id doesn't have to be first; still disallowed -assert.writeError(testColl.insert({xxx: "ABCDEF", _id: /ABCDEF/}, {writeConcern: {w: 1}})); \ No newline at end of file +assert.writeError(testColl.insert({xxx: "ABCDEF", _id: /ABCDEF/})); diff --git a/jstests/core/remove8.js b/jstests/core/remove8.js index d45891faac6..ab82a915449 100644 --- a/jstests/core/remove8.js +++ b/jstests/core/remove8.js @@ -1,7 +1,11 @@ -// Cannot implicitly shard accessed collections because unsupported use of sharded collection -// from db.eval. -// @tags: [assumes_unsharded_collection, requires_non_retryable_commands, -// requires_non_retryable_writes] +// @tags: [ +// # Cannot implicitly shard accessed collections because unsupported use of sharded collection +// # from db.eval. +// assumes_unsharded_collection, +// requires_eval_command, +// requires_non_retryable_commands, +// requires_non_retryable_writes, +// ] t = db.remove8; t.drop(); diff --git a/jstests/core/rename4.js b/jstests/core/rename4.js index 2879140ed5c..e1e9dbe2a9b 100644 --- a/jstests/core/rename4.js +++ b/jstests/core/rename4.js @@ -1,4 +1,7 @@ -// @tags: [requires_non_retryable_writes] +// @tags: [ +// requires_eval_command, +// requires_non_retryable_commands, +// ] t = db.jstests_rename4; t.drop(); diff --git a/jstests/core/shell_writeconcern.js b/jstests/core/shell_writeconcern.js index 6d3680dee83..26d68304c63 100644 --- a/jstests/core/shell_writeconcern.js +++ b/jstests/core/shell_writeconcern.js @@ -1,7 +1,11 @@ // Cannot implicitly shard accessed collections because of following errmsg: A single // update/delete on a sharded collection must contain an exact match on _id or contain the shard // key. -// @tags: [assumes_unsharded_collection, cannot_inject_read_write_concern] +// +// @tags: [ +// assumes_unsharded_collection, +// assumes_write_concern_unchanged, +// ] "use strict"; // check that shell writeconcern work correctly diff --git a/jstests/core/stages_delete.js b/jstests/core/stages_delete.js index 1d33d778acc..46d7f316212 100644 --- a/jstests/core/stages_delete.js +++ b/jstests/core/stages_delete.js @@ -1,4 +1,9 @@ -// @tags: [does_not_support_stepdowns] +// @tags: [ +// # This test attempts to remove documents using the stageDebug command, which doesn't support +// # specifying a writeConcern. +// assumes_write_concern_unchanged, +// does_not_support_stepdowns, +// ] // Test basic delete stage functionality. var coll = db.stages_delete; diff --git a/jstests/core/storefunc.js b/jstests/core/storefunc.js index 960763753ed..42caed6f861 100644 --- a/jstests/core/storefunc.js +++ b/jstests/core/storefunc.js @@ -1,4 +1,8 @@ -// @tags: [requires_non_retryable_commands, requires_non_retryable_writes] +// @tags: [ +// requires_eval_command, +// requires_non_retryable_commands, +// requires_non_retryable_writes, +// ] // Use a private sister database to avoid conflicts with other tests that use system.js var testdb = db.getSisterDB("storefunc"); diff --git a/jstests/core/update_multi5.js b/jstests/core/update_multi5.js index 6c3ae9265a8..a1be71cd652 100644 --- a/jstests/core/update_multi5.js +++ b/jstests/core/update_multi5.js @@ -9,8 +9,8 @@ assert.writeOK(t.insert({path: 'r1', subscribers: [1, 2]})); assert.writeOK(t.insert({path: 'r2', subscribers: [3, 4]})); - var res = assert.writeOK(t.update( - {}, {$addToSet: {subscribers: 5}}, {upsert: false, multi: true, writeConcern: {w: 1}})); + var res = + assert.writeOK(t.update({}, {$addToSet: {subscribers: 5}}, {upsert: false, multi: true})); assert.eq(res.nMatched, 2, tojson(res)); diff --git a/jstests/core/write_result.js b/jstests/core/write_result.js index 9ccef44458d..dc641501815 100644 --- a/jstests/core/write_result.js +++ b/jstests/core/write_result.js @@ -1,7 +1,12 @@ // Cannot implicitly shard accessed collections because of following errmsg: A single // update/delete on a sharded collection must contain an exact match on _id or contain the shard // key. -// @tags: [assumes_unsharded_collection, requires_non_retryable_writes] +// +// @tags: [ +// assumes_unsharded_collection, +// assumes_write_concern_unchanged, +// requires_non_retryable_writes, +// ] // // Tests the behavior of single writes using write commands -- cgit v1.2.1