Includes workloads for:
aggregation
mapReduce and group workloads
creating and dropping roles and users
update(...)
basic workloads for capped collections
findAndModify
remove(...)
dropping db/collection, renaming collections, and for server status
Updates blacklists to fsm_*js runners to work around MongoDB restrictions or known bugs.
Closes #902
Signed-off-by: Benety Goh <benety@mongodb.com>
38 lines
1.1 KiB
JavaScript
38 lines
1.1 KiB
JavaScript
'use strict';
|
|
|
|
/**
|
|
* remove_single_document_eval.js
|
|
*
|
|
* Runs remove_single_document using the eval command.
|
|
*/
|
|
load('jstests/concurrency/fsm_libs/extend_workload.js'); // for extendWorkload
|
|
load('jstests/concurrency/fsm_workloads/remove_single_document.js'); // for $config
|
|
|
|
var $config = extendWorkload($config, function($config, $super) {
|
|
|
|
$config.data.doRemove = function doRemove(db, collName, query, options) {
|
|
var evalResult = db.runCommand({
|
|
eval: function(f, collName, query, options) {
|
|
return tojson(f(db, collName, query, options));
|
|
},
|
|
args: [$super.data.doRemove, collName, query, options],
|
|
nolock: this.nolock
|
|
});
|
|
assertAlways.commandWorked(evalResult);
|
|
var res = JSON.parse(evalResult.retval);
|
|
return res;
|
|
};
|
|
|
|
$config.data.assertResult = function assertResult(res) {
|
|
assertWhenOwnColl.eq(1, res.nRemoved, tojson(res));
|
|
};
|
|
|
|
$config.data.nolock = false;
|
|
|
|
// scale down threadCount and iterations because eval takes a global lock
|
|
$config.threadCount = 5;
|
|
$config.iterations = 10;
|
|
|
|
return $config;
|
|
});
|