summaryrefslogtreecommitdiff
path: root/jstests/tool/exportimport_bigarray.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/tool/exportimport_bigarray.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/tool/exportimport_bigarray.js')
-rw-r--r--jstests/tool/exportimport_bigarray.js11
1 files changed, 8 insertions, 3 deletions
diff --git a/jstests/tool/exportimport_bigarray.js b/jstests/tool/exportimport_bigarray.js
index dbdd2a9a6d7..43a209b8453 100644
--- a/jstests/tool/exportimport_bigarray.js
+++ b/jstests/tool/exportimport_bigarray.js
@@ -21,11 +21,16 @@ 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) {
- bulk.insert({ x: bigString });
+ src.insert({ x : bigString });
+}
+var lastError = exportimport_db.getLastError();
+if (lastError == null) {
+ print('Finished inserting ' + numDocs + ' documents');
+}
+else {
+ doassert('Insertion failed: ' + lastError);
}
-assert.writeOK(bulk.execute());
data = 'data/exportimport_array_test.json';