diff options
Diffstat (limited to 'jstests/core/single_batch.js')
-rw-r--r-- | jstests/core/single_batch.js | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/jstests/core/single_batch.js b/jstests/core/single_batch.js index ccf9f73362f..b06e5ce7aa5 100644 --- a/jstests/core/single_batch.js +++ b/jstests/core/single_batch.js @@ -1,21 +1,21 @@ // Test the "single batch" semantics of negative limit. (function() { - 'use strict'; +'use strict'; - var coll = db.jstests_single_batch; - coll.drop(); +var coll = db.jstests_single_batch; +coll.drop(); - // Approximately 1 MB. - var padding = new Array(1024 * 1024).join("x"); +// Approximately 1 MB. +var padding = new Array(1024 * 1024).join("x"); - // Insert ~20 MB of data. - for (var i = 0; i < 20; i++) { - assert.writeOK(coll.insert({_id: i, padding: padding})); - } +// Insert ~20 MB of data. +for (var i = 0; i < 20; i++) { + assert.writeOK(coll.insert({_id: i, padding: padding})); +} - // The limit is 18, but we should end up with fewer documents since 18 docs won't fit in a - // single 16 MB batch. - var numResults = coll.find().limit(-18).itcount(); - assert.lt(numResults, 18); - assert.gt(numResults, 0); +// The limit is 18, but we should end up with fewer documents since 18 docs won't fit in a +// single 16 MB batch. +var numResults = coll.find().limit(-18).itcount(); +assert.lt(numResults, 18); +assert.gt(numResults, 0); })(); |