diff options
author | Jason Rassi <rassi@10gen.com> | 2015-11-02 14:04:16 -0500 |
---|---|---|
committer | Jason Rassi <rassi@10gen.com> | 2015-11-05 13:56:56 -0500 |
commit | e2cbe3c873fa2f989e5c2b811b1757ac0f2095e3 (patch) | |
tree | 973d62ef29e235ce2e6208d1bd64477a75c53b58 /jstests/core | |
parent | 3b76b83742bcd2124abe38718ad5c68bd72b2fc8 (diff) | |
download | mongo-e2cbe3c873fa2f989e5c2b811b1757ac0f2095e3.tar.gz |
SERVER-19510 ExtensionsCallbackReal ctor take ptr to NamespaceString
Diffstat (limited to 'jstests/core')
-rw-r--r-- | jstests/core/currentop_predicate.js | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/jstests/core/currentop_predicate.js b/jstests/core/currentop_predicate.js new file mode 100644 index 00000000000..ef0dd854464 --- /dev/null +++ b/jstests/core/currentop_predicate.js @@ -0,0 +1,12 @@ +// Tests the use of a match predicate with the currentOp command. +(function() { + // Test a $where predicate that matches the currentOp operation we are running. + var res = db.adminCommand("currentOp", {$where: function() { return true; }}); + assert.commandWorked(res); + assert.gt(res.inprog.length, 0, tojson(res)); + + // Test a $where predicate that matches no operations. + res = db.adminCommand("currentOp", {$where: function() { return false; }}); + assert.commandWorked(res); + assert.eq(res.inprog.length, 0, tojson(res)); +})(); |