diff options
Diffstat (limited to 'jstests/sharding/mongos_no_detect_sharding.js')
-rw-r--r-- | jstests/sharding/mongos_no_detect_sharding.js | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/jstests/sharding/mongos_no_detect_sharding.js b/jstests/sharding/mongos_no_detect_sharding.js index d5e9b53bf34..6a9d1dc63b8 100644 --- a/jstests/sharding/mongos_no_detect_sharding.js +++ b/jstests/sharding/mongos_no_detect_sharding.js @@ -29,14 +29,15 @@ print( "Seeing if data gets inserted unsharded..." ) print( "No splits occur here!" ) // Insert a bunch of data which should trigger a split +var bulk = coll.initializeUnorderedBulkOp(); for( var i = 0; i < 100; i++ ){ - coll.insert({ i : i + 1 }) + bulk.insert({ i : i + 1 }); } -coll.getDB().getLastError() +assert.writeOK(bulk.execute()); config.printShardingStatus( true ) assert.eq( coll.getShardVersion().ok, 1 ) assert.eq( 101, coll.find().itcount() ) -st.stop()
\ No newline at end of file +st.stop() |