summaryrefslogtreecommitdiff
path: root/jstests/noPassthrough/ftdc_setparam.js
blob: d4cf4029426f514e2ddd37b69432530548941820 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// validate command line ftdc parameter parsing

(function() {
    'use strict';
    var m = MongoRunner.runMongod({setParameter: "diagnosticDataCollectionPeriodMillis=101"});

    // Check the defaults are correct
    //
    function getparam(field) {
        var q = {getParameter: 1};
        q[field] = 1;

        var ret = m.getDB("admin").runCommand(q);
        return ret[field];
    }

    assert.eq(getparam("diagnosticDataCollectionPeriodMillis"), 101);
})();