Files
mongo/jstests/concurrency/fsm_workloads/explain_group.js
alabid f6a65290f2 SERVER-16648 Additional FSM-based concurrency workloads with some cleanup and blacklisting
Includes workloads for:
    explain
    compact
    reindex
    collMod
    count
    distinct
    touch
    $where
Added to blacklists in FSM runners
Fixed the way we check for storage engines
Added two options for arbitrary function execution against cluster:
    - Specified via ClusterOptions as setupFunctions to be run on the
      cluster before workloads are run
    - As part of setup and teardown with the cluster provided as a third
      argument to these workload functions
2015-02-05 16:14:37 -05:00

30 lines
864 B
JavaScript

'use strict';
/**
* explain_group.js
*
* Runs explain() and group() on a collection.
*
*/
load('jstests/concurrency/fsm_libs/extend_workload.js'); // for extendWorkload
load('jstests/concurrency/fsm_workloads/explain.js'); // for $config
load('jstests/libs/analyze_plan.js'); // for planHasStage
var $config = extendWorkload($config, function($config, $super) {
$config.states = Object.extend({
explainBasicGroup: function explainBasicGroup(db, collName) {
var res = db[collName].explain().group(
{ key: { i: 1 }, initial: {}, reduce: function() {} }
);
assertAlways.commandWorked(res);
}
}, $super.states);
$config.transitions = Object.extend({
explain: $config.data.assignEqualProbsToTransitions($config.states)
}, $super.transitions);
return $config;
});