summaryrefslogtreecommitdiff
path: root/jstests/concurrency/fsm_workloads/server_status.js
blob: dbde1420b9957a791b2b99ddf3dfa33d99075af2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
'use strict';

/**
 * server_status.js
 *
 * Simply checks that the serverStatus command works
 */
var $config = (function() {

    var states = {
        status: function status(db, collName) {
            var opts = {
                opcounterRepl: 1,
                oplog: 1,
                rangeDeleter: 1,
                repl: 1,
                security: 1,
                tcmalloc: 1
            };
            var res = db.serverStatus();
            assertAlways.commandWorked(res);
            assertAlways(res.hasOwnProperty('version'));
        }
    };

    var transitions = {
        status: {status: 1}
    };

    return {
        threadCount: 10,
        iterations: 20,
        states: states,
        startState: 'status',
        transitions: transitions
    };
})();