summaryrefslogtreecommitdiff
path: root/jstests/noPassthroughWithMongod/sharding_migrate_cursor1.js
diff options
context:
space:
mode:
Diffstat (limited to 'jstests/noPassthroughWithMongod/sharding_migrate_cursor1.js')
-rw-r--r--jstests/noPassthroughWithMongod/sharding_migrate_cursor1.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/jstests/noPassthroughWithMongod/sharding_migrate_cursor1.js b/jstests/noPassthroughWithMongod/sharding_migrate_cursor1.js
index 2948dbef3f9..c4484356dd4 100644
--- a/jstests/noPassthroughWithMongod/sharding_migrate_cursor1.js
+++ b/jstests/noPassthroughWithMongod/sharding_migrate_cursor1.js
@@ -23,11 +23,11 @@ numDocs = 20 * docsPerChunk
print( "stringSize: " + stringSize + " docsPerChunk: " + docsPerChunk + " numDocs: " + numDocs )
-for ( i=0; i<numDocs; i++ ){
- t.insert( { _id : i , s : bigString } );
+var bulk = t.initializeUnorderedBulkOp();
+for (var i = 0; i < numDocs; i++){
+ bulk.insert({ _id: i, s: bigString });
}
-
-db.getLastError();
+assert.writeOK(bulk.execute());
s.adminCommand( { shardcollection : "test.foo" , key : { _id : 1 } } );