diff options
Diffstat (limited to 'jstests/core/index_create_too_many.js')
-rw-r--r-- | jstests/core/index_create_too_many.js | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/jstests/core/index_create_too_many.js b/jstests/core/index_create_too_many.js index add81a86703..44d5016a7cf 100644 --- a/jstests/core/index_create_too_many.js +++ b/jstests/core/index_create_too_many.js @@ -6,7 +6,10 @@ coll.drop(); // create 62 indexes, which leaves us with 63 indexes total (+1 for the _id index) for (var i = 0; i < 62; i++) { var name = 'i' + i; - var spec = {key: {}, name: name}; + var spec = { + key: {}, + name: name + }; spec.key[name] = 1; var res = coll.runCommand('createIndexes', {indexes: [spec]}); @@ -14,12 +17,8 @@ for (var i = 0; i < 62; i++) { } // attempt to add 2 more indexes to push over the limit (64). -var newSpecs = [ - {key: {i62: 1 }, name: 'i62'}, - {key: {i63: 1 }, name: 'i63'} -]; +var newSpecs = [{key: {i62: 1}, name: 'i62'}, {key: {i63: 1}, name: 'i63'}]; var res = coll.runCommand('createIndexes', {indexes: newSpecs}); assert.commandFailed(res, tojson(res)); -assert.eq(res.code, 67); // CannotCreateIndex - +assert.eq(res.code, 67); // CannotCreateIndex |