Files
mongo/jstests/core/currentop_predicate.js
Jack Mulrow 00d92ece19 SERVER-31194 Add jscore tags for retryable_writes_jscore_stepdown_passthrough.yml suite
The actual suite will come in a follow-up commit.
2017-12-07 14:36:15 -05:00

15 lines
565 B
JavaScript

// @tags: [does_not_support_stepdowns]
// Tests the use of a match predicate with the currentOp command.
(function() {
// Test a predicate that matches the currentOp operation we are running.
var res = db.adminCommand("currentOp", {command: {$exists: true}});
assert.commandWorked(res);
assert.gt(res.inprog.length, 0, tojson(res));
// Test a predicate that matches no operations.
res = db.adminCommand("currentOp", {dummyCurOpField: {exists: true}});
assert.commandWorked(res);
assert.eq(res.inprog.length, 0, tojson(res));
})();