summaryrefslogtreecommitdiff
path: root/jstests/noPassthroughWithMongod/mapreduce_intermediate_reduce.js
diff options
context:
space:
mode:
authorDavid Storch <david.storch@10gen.com>2014-05-06 19:00:56 -0400
committerDavid Storch <david.storch@10gen.com>2014-05-06 19:00:56 -0400
commit72380726608df663a85bee24d69a20ed2ca8287d (patch)
tree735b7724ddc814fdf385d754bd7921975b5de491 /jstests/noPassthroughWithMongod/mapreduce_intermediate_reduce.js
parent3061ab54eb2cc642a279becfca0b93f5e17db117 (diff)
downloadmongo-72380726608df663a85bee24d69a20ed2ca8287d.tar.gz
Revert "SERVER-13741 Migrate remaining tests to use write commands"
This reverts commit 87dc3ae516e1d12a632dc604710661e38ed7b3dd.
Diffstat (limited to 'jstests/noPassthroughWithMongod/mapreduce_intermediate_reduce.js')
-rw-r--r--jstests/noPassthroughWithMongod/mapreduce_intermediate_reduce.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/jstests/noPassthroughWithMongod/mapreduce_intermediate_reduce.js b/jstests/noPassthroughWithMongod/mapreduce_intermediate_reduce.js
index 1ff024fcb03..fd7ec8c68e7 100644
--- a/jstests/noPassthroughWithMongod/mapreduce_intermediate_reduce.js
+++ b/jstests/noPassthroughWithMongod/mapreduce_intermediate_reduce.js
@@ -15,14 +15,14 @@ var coll = db.getCollection("mrInput");
//
var expectedOutColl = [];
-var bulk = coll.initializeUnorderedBulkOp();
for (var i = 0; i < 10; i++) {
for (var j = 1; j < 50; j++) {
- bulk.insert({ idx: i, j: j });
+ coll.insert({idx: i, j: j});
}
expectedOutColl.push ({ _id: i, value: j - 1 });
}
-assert.writeOK(bulk.execute());
+
+assertGLEOK(db.getLastErrorObj());
function mapFn() { emit(this.idx, 1); };
function reduceFn(key, values) { return Array.sum(values); };
@@ -41,4 +41,4 @@ assert.eq(out.counts.emit, 490, "emit count is wrong");
// changed, such as reduceTriggerRatio or maxInMemSize. If not the case, then something else
// must have changed with when intermediate reduces occur (see mongo::mr::State::checkSize).
//
-assert.eq(out.counts.reduce, 14, "reduce count is wrong");
+assert.eq(out.counts.reduce, 14, "reduce count is wrong"); \ No newline at end of file