/** This tests ensures that when a stand-alone server is started with something in * local.system.replset, it doesn't start the TTL monitor (SERVER-6609). The test creates a * dummy replset config & TTL collection, then restarts the member and ensures that it doesn't * time out the docs in the TTL collection. Then it removes the "config" and * restarts, ensuring that the TTL monitor deletes the docs. */ var runner; var conn; var primeSystemReplset = function() { var port = allocatePorts(1)[0]; runner = new MongodRunner(port, MongoRunner.dataDir + "/jstests_slowNightly-ttl"); conn = runner.start(); var localDB = conn.getDB("local"); localDB.system.replset.insert({x:1}); print("create a TTL collection"); var testDB = conn.getDB("test"); assert.commandWorked(testDB.foo.ensureIndex({ x: 1 }, { expireAfterSeconds: 2 })); }; var restartWithConfig = function() { stopMongod(runner.port(), 15); conn = runner.start(true /* reuse data */); testDB = conn.getDB("test"); var n = 100; for (var i=0; i