diff options
Diffstat (limited to 'jstests/noPassthrough/ttl_partial_index.js')
-rw-r--r-- | jstests/noPassthrough/ttl_partial_index.js | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/jstests/noPassthrough/ttl_partial_index.js b/jstests/noPassthrough/ttl_partial_index.js index 65e5fadc7d4..3da3a8a1513 100644 --- a/jstests/noPassthrough/ttl_partial_index.js +++ b/jstests/noPassthrough/ttl_partial_index.js @@ -8,8 +8,8 @@ coll.drop(); // Create TTL partial index. - assert.commandWorked(coll.ensureIndex({x: 1}, {expireAfterSeconds: 0, - partialFilterExpression: {z: {$exists: true}}})); + assert.commandWorked(coll.ensureIndex( + {x: 1}, {expireAfterSeconds: 0, partialFilterExpression: {z: {$exists: true}}})); var now = new Date(); assert.writeOK(coll.insert({x: now, z: 2})); @@ -19,12 +19,12 @@ // collection when it ran the first time). var ttlPass = coll.getDB().serverStatus().metrics.ttl.passes; assert.soon(function() { - return coll.getDB().serverStatus().metrics.ttl.passes >= ttlPass + 2; - }, - "TTL monitor didn't run before timing out."); + return coll.getDB().serverStatus().metrics.ttl.passes >= ttlPass + 2; + }, "TTL monitor didn't run before timing out."); - assert.eq(0, coll.find({z: {$exists: true}}).hint({x: 1}).itcount(), + assert.eq(0, + coll.find({z: {$exists: true}}).hint({x: 1}).itcount(), "Wrong number of documents in partial index, after TTL monitor run"); - assert.eq(1, coll.find().itcount(), - "Wrong number of documents in collection, after TTL monitor run"); + assert.eq( + 1, coll.find().itcount(), "Wrong number of documents in collection, after TTL monitor run"); })(); |