summaryrefslogtreecommitdiff
path: root/jstests/sharding/features3.js
diff options
context:
space:
mode:
authorRandolph Tan <randolph@10gen.com>2014-03-04 17:41:56 -0500
committerRandolph Tan <randolph@10gen.com>2014-04-21 16:53:25 -0400
commit7acafe85d9bdd63122c19ba1cca86a7f55174941 (patch)
tree234effd8e5a5b6c63d8b12c74de2d9acb78a7509 /jstests/sharding/features3.js
parente87b42c4f13e48078f5c4aefba3caf18dcfba072 (diff)
downloadmongo-7acafe85d9bdd63122c19ba1cca86a7f55174941.tar.gz
SERVER-13425 migrate sharding jstest suite to use write commands api
Diffstat (limited to 'jstests/sharding/features3.js')
-rw-r--r--jstests/sharding/features3.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/jstests/sharding/features3.js b/jstests/sharding/features3.js
index 83171d86f40..3b6b114a781 100644
--- a/jstests/sharding/features3.js
+++ b/jstests/sharding/features3.js
@@ -30,10 +30,11 @@ s.adminCommand({moveChunk: "test.foo", find: {_id: 3},
s.setBalancer(true)
// insert 10k small documents into the sharded collection
+var bulk = db.foo.initializeUnorderedBulkOp();
for (i = 0; i < numDocs; i++)
- db.foo.insert({_id: i});
+ bulk.insert({ _id: i });
+assert.writeOK(bulk.execute());
-db.getLastError();
var x = db.foo.stats();
// verify the colleciton has been sharded and documents are evenly distributed