summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGabriel Russell <gabriel.russell@mongodb.com>2015-11-17 13:34:23 -0500
committerGabriel Russell <gabriel.russell@mongodb.com>2015-11-17 13:34:23 -0500
commitff9ac83305309194e10fffd5c6d4e7a004e43cfd (patch)
tree3a0f2e9271560b2f9894c31d314a2efcc2ffb2ad
parent1f86fa526895920339b0ee6200703ff4654a489b (diff)
downloadmongo-ff9ac83305309194e10fffd5c6d4e7a004e43cfd.tar.gz
TOOLS-968 findAndModify is opcounted as a command
-rw-r--r--test/qa-tests/jstests/top/mongotop_reports.js15
1 files changed, 5 insertions, 10 deletions
diff --git a/test/qa-tests/jstests/top/mongotop_reports.js b/test/qa-tests/jstests/top/mongotop_reports.js
index 4982294c848..c3e44dae289 100644
--- a/test/qa-tests/jstests/top/mongotop_reports.js
+++ b/test/qa-tests/jstests/top/mongotop_reports.js
@@ -12,7 +12,7 @@ load('jstests/top/util/mongotop_common.js');
var runTests = function(topology, passthrough) {
var readShell = '\nprint(\'starting read\'); \n' +
'for (var i = 0; i < 1000000; ++i) \n{ ' +
- ' db.getSiblingDB(\'foo\').bar.find({ x: i }).forEach(); \n' +
+ ' db.getSiblingDB(\'foo\').bar.find({ x: i }).forEach(function(){}); \n' +
' sleep(1); \n' +
'}\n';
@@ -24,14 +24,9 @@ load('jstests/top/util/mongotop_common.js');
var readWriteShell = '\nprint(\'starting read/write\'); \n' +
'for (var i = 0; i < 1000000; ++i) \n{ ' +
- ' db.getSiblingDB(\'foo\').bar.find({ x: i }).forEach(); \n' +
- ' db.runCommand({ \n' +
- ' findAndModify: \'bar\', \n' +
- ' query: { name: \'mongo\', state: \'top\', rating: 100 }, \n' +
- ' sort: { rating: 1 }, \n' +
- ' update: { $inc: { score: 1 } }, \n' +
- ' upsert: true \n' +
- ' }) \n' +
+ ' db.getSiblingDB(\'foo\').bar.insert({ x: i }); \n' +
+ ' db.getSiblingDB(\'foo\').bar.find({ x: i }).forEach(function(){}); \n' +
+ ' sleep(1); \n' +
'}\n';
var testSpaces = [
@@ -153,4 +148,4 @@ load('jstests/top/util/mongotop_common.js');
runTests(standaloneTopology, passthrough);
runTests(replicaSetTopology, passthrough);
});
-})(); \ No newline at end of file
+})();