diff options
Diffstat (limited to 'jstests/sharding/geo_shardedgeonear.js')
-rw-r--r-- | jstests/sharding/geo_shardedgeonear.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/jstests/sharding/geo_shardedgeonear.js b/jstests/sharding/geo_shardedgeonear.js index 85aef9eb894..269531f4caa 100644 --- a/jstests/sharding/geo_shardedgeonear.js +++ b/jstests/sharding/geo_shardedgeonear.js @@ -26,11 +26,13 @@ function test(db, sharded, indexType) { for (var i=0; i < numPts; i++) { var lat = 90 - Random.rand() * 180; var lng = 180 - Random.rand() * 360; - assert.writeOK(db[coll].insert({rand:Math.random(), loc: [lng, lat]})); + db[coll].insert({rand:Math.random(), loc: [lng, lat]}) + assert.eq(null, db.getLastError()); } assert.eq(db[coll].count(), numPts); - assert.commandWorked(db[coll].ensureIndex({ loc: indexType })); + db[coll].ensureIndex({loc: indexType}) + assert(!db.getLastError()); var queryPoint = [0,0] geoCmd = {geoNear: coll, near: queryPoint, spherical: true, includeLocs: true}; |