diff options
author | Randolph Tan <randolph@10gen.com> | 2014-05-14 14:11:11 -0400 |
---|---|---|
committer | Randolph Tan <randolph@10gen.com> | 2014-05-15 14:04:11 -0400 |
commit | 0dabee8227d445a18fa5e8e49b2be60ba2a0beef (patch) | |
tree | 5cd9058a4483202c2f7e2ab6f5c44079a74ac157 /jstests/tool/exportimport_bigarray.js | |
parent | 4de88387eec6c0bb08b10d0ba1574a656f56232d (diff) | |
download | mongo-0dabee8227d445a18fa5e8e49b2be60ba2a0beef.tar.gz |
SERVER-13741 Migrate remaining tests to use write commands
Diffstat (limited to 'jstests/tool/exportimport_bigarray.js')
-rw-r--r-- | jstests/tool/exportimport_bigarray.js | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/jstests/tool/exportimport_bigarray.js b/jstests/tool/exportimport_bigarray.js index 43a209b8453..dbdd2a9a6d7 100644 --- a/jstests/tool/exportimport_bigarray.js +++ b/jstests/tool/exportimport_bigarray.js @@ -21,16 +21,11 @@ print('Number of documents to exceed maximum BSON size: ' + numDocs) print('About to insert ' + numDocs + ' documents into ' + exportimport_db.getName() + '.' + src.getName()); var i; +var bulk = src.initializeUnorderedBulkOp(); for (i = 0; i < numDocs; ++i) { - src.insert({ x : bigString }); -} -var lastError = exportimport_db.getLastError(); -if (lastError == null) { - print('Finished inserting ' + numDocs + ' documents'); -} -else { - doassert('Insertion failed: ' + lastError); + bulk.insert({ x: bigString }); } +assert.writeOK(bulk.execute()); data = 'data/exportimport_array_test.json'; |