diff options
Diffstat (limited to 'jstests/libs')
-rw-r--r-- | jstests/libs/geo_near_random.js | 4 | ||||
-rw-r--r-- | jstests/libs/write_concern_util.js | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/jstests/libs/geo_near_random.js b/jstests/libs/geo_near_random.js index c45cec7e813..193809cd5db 100644 --- a/jstests/libs/geo_near_random.js +++ b/jstests/libs/geo_near_random.js @@ -40,9 +40,9 @@ GeoNearRandomTest.prototype.insertPts = function(nPts, indexBounds, scale, skipI if (!skipIndex) { if (!indexBounds) - this.t.createIndex({loc: '2d'}); + this.t.ensureIndex({loc: '2d'}); else - this.t.createIndex({loc: '2d'}, indexBounds); + this.t.ensureIndex({loc: '2d'}, indexBounds); } }; diff --git a/jstests/libs/write_concern_util.js b/jstests/libs/write_concern_util.js index b1118a095c1..68f01cb9e87 100644 --- a/jstests/libs/write_concern_util.js +++ b/jstests/libs/write_concern_util.js @@ -8,7 +8,7 @@ load("jstests/libs/fail_point_util.js"); function shardCollectionWithChunks(st, coll, numDocs) { var _db = coll.getDB(); var numberDoc = numDocs || 20; - coll.createIndex({x: 1}, {unique: true}); + coll.ensureIndex({x: 1}, {unique: true}); st.ensurePrimaryShard(_db.toString(), st.shard0.shardName); st.shardColl( coll.getName(), {x: 1}, {x: numberDoc / 2}, {x: numberDoc / 2}, _db.toString(), true); |