summaryrefslogtreecommitdiff
path: root/jstests/sharding/stats.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/stats.js
parente87b42c4f13e48078f5c4aefba3caf18dcfba072 (diff)
downloadmongo-7acafe85d9bdd63122c19ba1cca86a7f55174941.tar.gz
SERVER-13425 migrate sharding jstest suite to use write commands api
Diffstat (limited to 'jstests/sharding/stats.js')
-rw-r--r--jstests/sharding/stats.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/jstests/sharding/stats.js b/jstests/sharding/stats.js
index 7d551128cab..8660c782a41 100644
--- a/jstests/sharding/stats.js
+++ b/jstests/sharding/stats.js
@@ -26,9 +26,10 @@ s.adminCommand( { split : "test.foo" , middle : { _id : N/2 } } )
s.adminCommand({ moveChunk: "test.foo", find: { _id: 3 },
to: s.getNonPrimaries("test")[0], _waitForDelete: true });
+var bulk = db.foo.initializeUnorderedBulkOp();
for ( i=0; i<N; i++ )
- db.foo.insert( { _id : i } )
-db.getLastError();
+ bulk.insert( { _id : i } );
+assert.writeOK(bulk.execute());
x = db.foo.stats();
assert.eq( N , x.count , "coll total count expected" )