diff options
Diffstat (limited to 'jstests/noPassthroughWithMongod/sharding_balance1.js')
-rw-r--r-- | jstests/noPassthroughWithMongod/sharding_balance1.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/jstests/noPassthroughWithMongod/sharding_balance1.js b/jstests/noPassthroughWithMongod/sharding_balance1.js index 761dbf0f5a3..32bb8ba508e 100644 --- a/jstests/noPassthroughWithMongod/sharding_balance1.js +++ b/jstests/noPassthroughWithMongod/sharding_balance1.js @@ -15,12 +15,13 @@ while ( bigString.length < 10000 ) inserted = 0; num = 0; +var bulk = db.foo.initializeUnorderedBulkOp(); while ( inserted < ( 20 * 1024 * 1024 ) ){ - db.foo.insert( { _id : num++ , s : bigString } ); + bulk.insert({ _id: num++, s: bigString }); inserted += bigString.length; } +assert.writeOK(bulk.execute()); -db.getLastError(); s.adminCommand( { shardcollection : "test.foo" , key : { _id : 1 } } ); assert.lt( 20 , s.config.chunks.count() , "setup2" ); |