diff options
author | Dan Pasette <dan@10gen.com> | 2014-11-01 14:04:56 -0400 |
---|---|---|
committer | Dan Pasette <dan@mongodb.com> | 2014-11-01 14:04:56 -0400 |
commit | 1e31585822ec9066b43a0709cdb58fcfb49ca308 (patch) | |
tree | 0f7fec96332453bbbd00a1687df82b1a0ef93292 /jstests/gle/opcounters_legacy.js | |
parent | d1ca324125e215237fd05e19507d83e5dfe4303d (diff) | |
download | mongo-1e31585822ec9066b43a0709cdb58fcfb49ca308.tar.gz |
SERVER-15870 fix up some tests depending on unpruned serverStatus
Diffstat (limited to 'jstests/gle/opcounters_legacy.js')
-rw-r--r-- | jstests/gle/opcounters_legacy.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/jstests/gle/opcounters_legacy.js b/jstests/gle/opcounters_legacy.js index a3435719eac..27a02402779 100644 --- a/jstests/gle/opcounters_legacy.js +++ b/jstests/gle/opcounters_legacy.js @@ -150,7 +150,7 @@ t.drop(); t.insert({_id:0}) // Command, recognized, no error. -serverStatus = db.serverStatus(); +serverStatus = db.runCommand({serverStatus:1}); opCounters = serverStatus.opcounters metricsObj = serverStatus.metrics.commands assert.eq(opCounters.command + 1, db.serverStatus().opcounters.command); // "serverStatus" counted @@ -163,7 +163,7 @@ assert.eq( metricsObj.serverStatus.failed, "failed ServerStatus command counter incremented!" ) // Command, recognized, with error. -serverStatus = db.serverStatus(); +serverStatus = db.runCommand({serverStatus:1}); opCounters = serverStatus.opcounters metricsObj = serverStatus.metrics.commands var countVal = { "total" : 0, "failed" : 0 }; @@ -183,11 +183,11 @@ assert.eq( countVal.failed + 1, "failed count command counter did not increment" ) // Command, unrecognized. -serverStatus = db.serverStatus(); +serverStatus = db.runCommand({serverStatus:1}); opCounters = serverStatus.opcounters metricsObj = serverStatus.metrics.commands res = t.runCommand("invalid"); assert.eq(0, res.ok); assert.eq(opCounters.command + 1, db.serverStatus().opcounters.command); // "serverStatus" counted assert.eq(null, db.serverStatus().metrics.commands.invalid); -assert.eq(metricsObj['<UNKNOWN>'] +1, db.serverStatus().metrics.commands['<UNKNOWN>']);
\ No newline at end of file +assert.eq(metricsObj['<UNKNOWN>'] +1, db.serverStatus().metrics.commands['<UNKNOWN>']); |