summaryrefslogtreecommitdiff
path: root/jstests/noPassthroughWithMongod/balance_tags1.js
diff options
context:
space:
mode:
Diffstat (limited to 'jstests/noPassthroughWithMongod/balance_tags1.js')
-rw-r--r--jstests/noPassthroughWithMongod/balance_tags1.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/jstests/noPassthroughWithMongod/balance_tags1.js b/jstests/noPassthroughWithMongod/balance_tags1.js
index 945f0526b17..1122380d7bc 100644
--- a/jstests/noPassthroughWithMongod/balance_tags1.js
+++ b/jstests/noPassthroughWithMongod/balance_tags1.js
@@ -3,10 +3,11 @@ s = new ShardingTest( "balance_tags1" , 3 , 1 , 1 , { sync:true, chunksize : 1 ,
s.config.settings.update( { _id: "balancer" }, { $set : { stopped: false, _nosleep: true } } , true );
db = s.getDB( "test" );
+var bulk = db.foo.initializeUnorderedBulkOp();
for ( i=0; i<21; i++ ) {
- db.foo.insert( { _id : i , x : i } );
+ bulk.insert({ _id: i, x: i });
}
-db.getLastError();
+assert.writeOK(bulk.execute());
s.adminCommand( { enablesharding : "test" } )
s.adminCommand( { shardcollection : "test.foo" , key : { _id : 1 } } );