/** * Part 1: Simple test of TTL. Create a new collection with 24 docs, with timestamps at one hour * intervals, from now-minus-23 hours ago until now. Also add some docs with non-date * values. Then create a TTL index that expires all docs older than a string. Wait 70 * seconds (TTL monitor runs every 60) and check that no documents were deleted. * Part 2: Add a second TTL index that expires all docs older than ~5.5 hours (20000 * seconds). Wait 70 seconds and check that 18 docs deleted. * Part 3: Add a third TTL index on an identical field. The second index expires docs older than * ~2.8 hours (10000 seconds). Wait 70 seconds and check that 3 more docs deleted. */ assertEntryMatches = function(array, regex) { var found = false; for (i=0; i