diff options
author | Kevin Albertson <kevin.albertson@10gen.com> | 2018-02-08 09:46:57 -0500 |
---|---|---|
committer | Kevin Albertson <kevin.albertson@10gen.com> | 2018-02-08 09:46:57 -0500 |
commit | c556e377094792e7253a95cb5fedcd703a99bf2c (patch) | |
tree | b2032e22b5ab1ef21927f2483578cb11df3c341d /jstests/replsets | |
parent | e1fdc072a60a0cc47395e09c3d9a796f424e0040 (diff) | |
download | mongo-c556e377094792e7253a95cb5fedcd703a99bf2c.tar.gz |
SERVER-25640 terminate running processes in jstests
Diffstat (limited to 'jstests/replsets')
72 files changed, 87 insertions, 10 deletions
diff --git a/jstests/replsets/apply_ops_create_indexes.js b/jstests/replsets/apply_ops_create_indexes.js index 8a9e5303916..4fe813b5ed4 100644 --- a/jstests/replsets/apply_ops_create_indexes.js +++ b/jstests/replsets/apply_ops_create_indexes.js @@ -97,4 +97,6 @@ localDB = rst.getPrimary().getDB("local"); ensureOplogEntryExists(localDB, insertFormatIndexName); + + rst.stopSet(); }()); diff --git a/jstests/replsets/apply_ops_create_view.js b/jstests/replsets/apply_ops_create_view.js index 4554ea2dc76..0aac71ee490 100644 --- a/jstests/replsets/apply_ops_create_view.js +++ b/jstests/replsets/apply_ops_create_view.js @@ -14,4 +14,6 @@ const cmd = {applyOps: [{op: "c", ns: db + ".$cmd", o: {create: "foo", viewOn: "bar"}}]}; assert.commandWorked(db.runCommand(cmd), tojson(cmd)); assert.eq(db.foo.findOne({a: 1}).b, "hi"); + + replTest.stopSet(); }()); diff --git a/jstests/replsets/apply_ops_create_with_uuid.js b/jstests/replsets/apply_ops_create_with_uuid.js index 3628d6700f2..d3f69fc2a71 100644 --- a/jstests/replsets/apply_ops_create_with_uuid.js +++ b/jstests/replsets/apply_ops_create_with_uuid.js @@ -47,4 +47,5 @@ assert.eq(db.getCollectionInfos({name: "foo"}).length, 0, "expected foo collection to no longer exist"); + replTest.stopSet(); }()); diff --git a/jstests/replsets/apply_ops_idempotency.js b/jstests/replsets/apply_ops_idempotency.js index 974b4a9a5b5..c15e0b1c63a 100644 --- a/jstests/replsets/apply_ops_idempotency.js +++ b/jstests/replsets/apply_ops_idempotency.js @@ -175,4 +175,6 @@ for (let f in tests) testIdempotency(rst.getPrimary(), tests[f], f); + + rst.stopSet(); })(); diff --git a/jstests/replsets/apply_ops_wc.js b/jstests/replsets/apply_ops_wc.js index f44993705f9..793a9f43e99 100644 --- a/jstests/replsets/apply_ops_wc.js +++ b/jstests/replsets/apply_ops_wc.js @@ -135,4 +135,5 @@ secondaries[0].getDB('admin').runCommand({configureFailPoint: 'rsSyncApplyStop', mode: 'off'}); secondaries[1].getDB('admin').runCommand({configureFailPoint: 'rsSyncApplyStop', mode: 'off'}); + replTest.stopSet(); })(); diff --git a/jstests/replsets/auth1.js b/jstests/replsets/auth1.js index 9ab12cc7157..211beb9016e 100644 --- a/jstests/replsets/auth1.js +++ b/jstests/replsets/auth1.js @@ -207,4 +207,6 @@ load("jstests/replsets/rslib.js"); } return true; }); + MongoRunner.stopMongod(conn); + rs.stopSet(); })(); diff --git a/jstests/replsets/catchup.js b/jstests/replsets/catchup.js index c58dde887c0..82d542e9bbd 100644 --- a/jstests/replsets/catchup.js +++ b/jstests/replsets/catchup.js @@ -206,4 +206,5 @@ rst.awaitReplication(); checkOpInOplog(steppedDownPrimary, stepUpResults.latestOpOnOldPrimary, 1); + rst.stopSet(); })(); diff --git a/jstests/replsets/catchup_takeover_one_high_priority.js b/jstests/replsets/catchup_takeover_one_high_priority.js index b1d419f4b74..8ad201d2d30 100644 --- a/jstests/replsets/catchup_takeover_one_high_priority.js +++ b/jstests/replsets/catchup_takeover_one_high_priority.js @@ -84,4 +84,5 @@ replSet.waitForState(2, ReplSetTest.State.PRIMARY, 30 * 1000); jsTestLog('node 2 performed priority takeover and is now primary'); + replSet.stopSet(); })(); diff --git a/jstests/replsets/catchup_takeover_two_nodes_ahead.js b/jstests/replsets/catchup_takeover_two_nodes_ahead.js index f32b22e8bfa..69dddd079a1 100644 --- a/jstests/replsets/catchup_takeover_two_nodes_ahead.js +++ b/jstests/replsets/catchup_takeover_two_nodes_ahead.js @@ -56,4 +56,5 @@ replSet.waitForState(2, ReplSetTest.State.SECONDARY, replSet.kDefaultTimeoutMS); // Let the nodes catchup. restartServerReplication(nodes.slice(1, 5)); + replSet.stopSet(); })(); diff --git a/jstests/replsets/collate_id.js b/jstests/replsets/collate_id.js index 73a34c22433..6e6d56bc67d 100644 --- a/jstests/replsets/collate_id.js +++ b/jstests/replsets/collate_id.js @@ -62,4 +62,5 @@ secondaryDB.adminCommand({configureFailPoint: "rsSyncApplyStop", mode: "off"})); replTest.awaitReplication(); assert.eq(0, secondaryColl.find().itcount()); + replTest.stopSet(); })(); diff --git a/jstests/replsets/commands_that_write_accept_wc.js b/jstests/replsets/commands_that_write_accept_wc.js index 08af483b93a..b2dd90d2886 100644 --- a/jstests/replsets/commands_that_write_accept_wc.js +++ b/jstests/replsets/commands_that_write_accept_wc.js @@ -148,4 +148,5 @@ load('jstests/libs/write_concern_util.js'); testInvalidWriteConcern(cmd); }); + replTest.stopSet(); })(); diff --git a/jstests/replsets/copydb.js b/jstests/replsets/copydb.js index 2746035f6ef..e63f6e4b393 100644 --- a/jstests/replsets/copydb.js +++ b/jstests/replsets/copydb.js @@ -93,4 +93,5 @@ assert.eq(primaryTargetDB.foo.getIndexes().length, secondaryTargetDB.foo.getIndexes().length, 'incorrect number of indexes in target collection on secondary after copy'); + replTest.stopSet(); }()); diff --git a/jstests/replsets/dbhash_system_collections.js b/jstests/replsets/dbhash_system_collections.js index c55156a4992..c60532dfe1c 100644 --- a/jstests/replsets/dbhash_system_collections.js +++ b/jstests/replsets/dbhash_system_collections.js @@ -51,4 +51,5 @@ var primaryMd5 = checkDbHash(primary); var secondaryMd5 = checkDbHash(secondary); assert.eq(primaryMd5, secondaryMd5, 'dbhash is different on the primary and the secondary'); + rst.stopSet(); })(); diff --git a/jstests/replsets/double_rollback.js b/jstests/replsets/double_rollback.js index fe2eaccf165..9faf66263a4 100644 --- a/jstests/replsets/double_rollback.js +++ b/jstests/replsets/double_rollback.js @@ -143,5 +143,5 @@ // Verify data consistency between nodes. rst.checkReplicatedDataHashes(); rst.checkOplogs(); - + rst.stopSet(); }()); diff --git a/jstests/replsets/drain.js b/jstests/replsets/drain.js index 1f60713a6a6..41e8d475f83 100644 --- a/jstests/replsets/drain.js +++ b/jstests/replsets/drain.js @@ -106,4 +106,5 @@ // secondary and we cannot guarantee all writes reached the secondary's op queue prior to // shutting down the original primary. assert.gte(primary.getDB("foo").foo.find().itcount(), 2); + replSet.stopSet(); })(); diff --git a/jstests/replsets/drop_oplog.js b/jstests/replsets/drop_oplog.js index df89ec255ff..a221a1d20dd 100644 --- a/jstests/replsets/drop_oplog.js +++ b/jstests/replsets/drop_oplog.js @@ -32,5 +32,5 @@ renameOutput = localDB.foo.renameCollection("oplog.rs"); assert.eq(renameOutput.ok, 0); assert.eq(renameOutput.errmsg, "can't rename to live oplog while replicating"); - + rt.stopSet(); }()); diff --git a/jstests/replsets/election_id.js b/jstests/replsets/election_id.js index ff079ca1172..c6259020003 100644 --- a/jstests/replsets/election_id.js +++ b/jstests/replsets/election_id.js @@ -96,5 +96,6 @@ load("jstests/replsets/rslib.js"); var newElectionId = res.repl.electionId; assert.lt(oldElectionId.valueOf(), newElectionId.valueOf()); oldElectionId = newElectionId; + rst.stopSet(); })(); diff --git a/jstests/replsets/emptycapped.js b/jstests/replsets/emptycapped.js index 39a5c0eac56..c6b08fff9dc 100644 --- a/jstests/replsets/emptycapped.js +++ b/jstests/replsets/emptycapped.js @@ -92,4 +92,5 @@ {create: "view1", viewOn: "collection", pipeline: [{$match: {}}]})); assert.commandFailedWithCode(primaryTestDB.runCommand({emptycapped: "system.views"}), ErrorCodes.IllegalOperation); + rst.stopSet(); })(); diff --git a/jstests/replsets/explain_slaveok.js b/jstests/replsets/explain_slaveok.js index 8cd715af648..68eda89bce7 100644 --- a/jstests/replsets/explain_slaveok.js +++ b/jstests/replsets/explain_slaveok.js @@ -151,3 +151,4 @@ explainOut = secondary.getDB("test").runCommand({ verbosity: "executionStats" }); assert.commandFailed(explainOut, "explain write op on secondary, slaveOk true"); +replTest.stopSet(); diff --git a/jstests/replsets/get_replication_info_helper.js b/jstests/replsets/get_replication_info_helper.js index cd6ef7d8a10..920b729f636 100644 --- a/jstests/replsets/get_replication_info_helper.js +++ b/jstests/replsets/get_replication_info_helper.js @@ -51,5 +51,5 @@ assert.soon(function() { return rawMongoProgramOutput().match("behind the freshest"); }); - + replSet.stopSet(); })(); diff --git a/jstests/replsets/index_delete.js b/jstests/replsets/index_delete.js index c89a3d47348..5f64979dbc3 100644 --- a/jstests/replsets/index_delete.js +++ b/jstests/replsets/index_delete.js @@ -121,3 +121,5 @@ assert.soon(function() { return 1 == secondDB[collName].getIndexes().length; }, "Indexes not dropped on secondary"); assert.eq(1, secondDB[collName].getIndexes().length); + +replTest.stopSet(); diff --git a/jstests/replsets/index_restart_secondary.js b/jstests/replsets/index_restart_secondary.js index be328ede8bc..0b391d5f8e2 100644 --- a/jstests/replsets/index_restart_secondary.js +++ b/jstests/replsets/index_restart_secondary.js @@ -75,3 +75,5 @@ if (conns[0].getDB('test').serverBuildInfo().bits !== 32) { jsTest.log("index-restart-secondary.js complete"); } + +replTest.stopSet(); diff --git a/jstests/replsets/initial_sync4.js b/jstests/replsets/initial_sync4.js index e0ff50af4a2..884a4dcd165 100644 --- a/jstests/replsets/initial_sync4.js +++ b/jstests/replsets/initial_sync4.js @@ -81,6 +81,6 @@ assert.eq(mc.getIndexKeys().length, sc.getIndexKeys().length); assert.eq(mc.find().sort({x: 1}).itcount(), sc.find().sort({x: 1}).itcount()); - + MongoRunner.stopMongod(s); replTest.stopSet(15); }());
\ No newline at end of file diff --git a/jstests/replsets/initial_sync_applier_error.js b/jstests/replsets/initial_sync_applier_error.js index 7a280242024..36182e58c39 100644 --- a/jstests/replsets/initial_sync_applier_error.js +++ b/jstests/replsets/initial_sync_applier_error.js @@ -52,4 +52,5 @@ assert.eq(0, secondary.getDB('test').getCollection(name).count()); assert.eq(1, secondary.getDB('test').getCollection(newCollName).count()); assert.eq("hi", secondary.getDB('test').getCollection(newCollName).findOne({_id: 0}).content); + replSet.stopSet(); })(); diff --git a/jstests/replsets/initial_sync_capped_index.js b/jstests/replsets/initial_sync_capped_index.js index 2100b6f14bc..66895864d03 100644 --- a/jstests/replsets/initial_sync_capped_index.js +++ b/jstests/replsets/initial_sync_capped_index.js @@ -122,5 +122,5 @@ var failMsg = "Index validation of '" + secondaryCappedColl.name + "' failed: " + tojson(validate_result); assert(validate_result.valid, failMsg); - + replTest.stopSet(); })(); diff --git a/jstests/replsets/initial_sync_move_forward.js b/jstests/replsets/initial_sync_move_forward.js index 410b1eb707a..17f12a881d0 100644 --- a/jstests/replsets/initial_sync_move_forward.js +++ b/jstests/replsets/initial_sync_move_forward.js @@ -95,4 +95,5 @@ var indexSpec = GetIndexHelpers.findByKeyPattern(secondaryColl.getIndexes(), {x: 1}); assert.neq(null, indexSpec); assert.eq(true, indexSpec.unique); -})();
\ No newline at end of file + rst.stopSet(); +})(); diff --git a/jstests/replsets/initial_sync_oplog_rollover.js b/jstests/replsets/initial_sync_oplog_rollover.js index 95c93566f12..1ffdc6220c2 100644 --- a/jstests/replsets/initial_sync_oplog_rollover.js +++ b/jstests/replsets/initial_sync_oplog_rollover.js @@ -62,4 +62,5 @@ assert.eq(0, secondary.getDB('local')['temp_oplog_buffer'].find().itcount(), "Oplog buffer was not dropped after initial sync"); + replSet.stopSet(); })(); diff --git a/jstests/replsets/initial_sync_replSetGetStatus.js b/jstests/replsets/initial_sync_replSetGetStatus.js index 5d8398b5802..abb5e5c563f 100644 --- a/jstests/replsets/initial_sync_replSetGetStatus.js +++ b/jstests/replsets/initial_sync_replSetGetStatus.js @@ -87,4 +87,5 @@ assert.eq(0, secondary.getDB('local')['temp_oplog_buffer'].find().itcount(), "Oplog buffer was not dropped after initial sync"); + replSet.stopSet(); })(); diff --git a/jstests/replsets/initiate_replset_on_downgraded_standalone_node.js b/jstests/replsets/initiate_replset_on_downgraded_standalone_node.js index 9593c69c1cf..309a9cfd207 100644 --- a/jstests/replsets/initiate_replset_on_downgraded_standalone_node.js +++ b/jstests/replsets/initiate_replset_on_downgraded_standalone_node.js @@ -37,4 +37,5 @@ // Check an arbitrary collection's uuid field. assert.eq(undefined, getUUIDFromListCollections(conn.getDB("local"), "startup_log")); + MongoRunner.stopMongod(conn); }()); diff --git a/jstests/replsets/last_op_visible.js b/jstests/replsets/last_op_visible.js index f5a50596ea4..99b081d8a26 100644 --- a/jstests/replsets/last_op_visible.js +++ b/jstests/replsets/last_op_visible.js @@ -52,5 +52,5 @@ load("jstests/replsets/rslib.js"); {"$replData": 1}); assert.commandWorked(res.commandReply); assert.eq(last_op_visible, res.metadata["$replData"].lastOpVisible); - + replTest.stopSet(); }()); diff --git a/jstests/replsets/lastop.js b/jstests/replsets/lastop.js index e1bf6c6fbd4..497afa1c9c5 100644 --- a/jstests/replsets/lastop.js +++ b/jstests/replsets/lastop.js @@ -130,5 +130,5 @@ m1.getCollection("test.foo").update({m1: 1}, {$set: {m1: 4}}); noOp = m1.getCollection("test.foo").getDB().getLastErrorObj().lastOp; assert.eq(noOp, fifthteenthOp); - + replTest.stopSet(); })(); diff --git a/jstests/replsets/linearizable_read_concern.js b/jstests/replsets/linearizable_read_concern.js index 80c435aaccb..da544cc9e55 100644 --- a/jstests/replsets/linearizable_read_concern.js +++ b/jstests/replsets/linearizable_read_concern.js @@ -122,4 +122,5 @@ load('jstests/libs/write_concern_util.js'); print('replSetStepDown did not throw exception but returned: ' + tojson(result)); }); parallelShell(); + replTest.stopSet(); }()); diff --git a/jstests/replsets/maintenance.js b/jstests/replsets/maintenance.js index 8b4765212b8..77934123e68 100644 --- a/jstests/replsets/maintenance.js +++ b/jstests/replsets/maintenance.js @@ -93,3 +93,4 @@ result = conns[1].getDB("admin").runCommand({replSetMaintenance: 0}); assert.eq(result.ok, 1, tojson(result)); secondarySoon(); +replTest.stopSet(); diff --git a/jstests/replsets/maintenance_non-blocking.js b/jstests/replsets/maintenance_non-blocking.js index 4606bcc1985..5581ffe3546 100644 --- a/jstests/replsets/maintenance_non-blocking.js +++ b/jstests/replsets/maintenance_non-blocking.js @@ -41,6 +41,7 @@ doTest = function() { print("******* fsyncUnlock'n secondary ************* "); sDB.fsyncUnlock(); + replTest.stopSet(); }; doTest(); diff --git a/jstests/replsets/no_chaining.js b/jstests/replsets/no_chaining.js index 07a67c3ea2b..c7847b71504 100644 --- a/jstests/replsets/no_chaining.js +++ b/jstests/replsets/no_chaining.js @@ -60,3 +60,5 @@ if (!_isWindows()) { var config = master.getDB("local").system.replset.findOne(); assert.eq(false, config.settings.chainingAllowed, tojson(config)); } + +replTest.stopSet();
\ No newline at end of file diff --git a/jstests/replsets/noop_writes_wait_for_write_concern.js b/jstests/replsets/noop_writes_wait_for_write_concern.js index 3c23e887268..2e06b824728 100644 --- a/jstests/replsets/noop_writes_wait_for_write_concern.js +++ b/jstests/replsets/noop_writes_wait_for_write_concern.js @@ -232,4 +232,5 @@ testCommandWithWriteConcern(cmd); }); + replTest.stopSet(); })();
\ No newline at end of file diff --git a/jstests/replsets/oplog_term.js b/jstests/replsets/oplog_term.js index 76ba6babfa7..70339e0d523 100644 --- a/jstests/replsets/oplog_term.js +++ b/jstests/replsets/oplog_term.js @@ -53,4 +53,6 @@ assert.eq(status.term, oplogEntry.t, 'term in oplog entry does not match term in status: ' + tojson(oplogEntry)); + + replSet.stopSet(); })(); diff --git a/jstests/replsets/oplog_wallclock.js b/jstests/replsets/oplog_wallclock.js index bedb27e95e0..b11b125923b 100644 --- a/jstests/replsets/oplog_wallclock.js +++ b/jstests/replsets/oplog_wallclock.js @@ -26,4 +26,5 @@ assert.writeOK(collection.remove({_id: 1})); assertLastOplogHasWT(primary, 'remove'); + replSet.stopSet(); })(); diff --git a/jstests/replsets/pipelineout.js b/jstests/replsets/pipelineout.js index 44441e63d5c..f6a32290001 100644 --- a/jstests/replsets/pipelineout.js +++ b/jstests/replsets/pipelineout.js @@ -30,3 +30,5 @@ assert.throws(function() { primary.coll.aggregate({$out: "out"}).itcount(); replTest.awaitReplication(); assert.eq(primary.out.find().sort({x: 1}).toArray(), secondary.out.find().sort({x: 1}).toArray()); + +replTest.stopSet();
\ No newline at end of file diff --git a/jstests/replsets/plan_cache_slaveok.js b/jstests/replsets/plan_cache_slaveok.js index 2de5749f086..1703620a0d5 100644 --- a/jstests/replsets/plan_cache_slaveok.js +++ b/jstests/replsets/plan_cache_slaveok.js @@ -70,3 +70,5 @@ assertPlanCacheCommandsFail(secondary.getDB("test")); // With slave ok true, the commands should succeed on the secondary. secondary.getDB("test").getMongo().setSlaveOk(true); assertPlanCacheCommandsSucceed(secondary.getDB("test")); + +replTest.stopSet(); diff --git a/jstests/replsets/priority_takeover_cascading_priorities.js b/jstests/replsets/priority_takeover_cascading_priorities.js index e210d250f10..f55997aa5c2 100644 --- a/jstests/replsets/priority_takeover_cascading_priorities.js +++ b/jstests/replsets/priority_takeover_cascading_priorities.js @@ -32,4 +32,5 @@ replSet.waitForState(2, ReplSetTest.State.PRIMARY); // Cannot stop any more nodes because we will not have a majority. + replSet.stopSet(); })(); diff --git a/jstests/replsets/priority_takeover_one_node_higher_priority.js b/jstests/replsets/priority_takeover_one_node_higher_priority.js index 3059ea2cd00..b4385cc2376 100644 --- a/jstests/replsets/priority_takeover_one_node_higher_priority.js +++ b/jstests/replsets/priority_takeover_one_node_higher_priority.js @@ -42,4 +42,5 @@ // Eventually node 0 will stand for election again because it has a higher priorty. replSet.waitForState(replSet.nodes[0], ReplSetTest.State.PRIMARY); + replSet.stopSet(); })(); diff --git a/jstests/replsets/priority_takeover_two_nodes_equal_priority.js b/jstests/replsets/priority_takeover_two_nodes_equal_priority.js index 10f31796b2a..e05805b1e96 100644 --- a/jstests/replsets/priority_takeover_two_nodes_equal_priority.js +++ b/jstests/replsets/priority_takeover_two_nodes_equal_priority.js @@ -52,5 +52,6 @@ load('jstests/replsets/rslib.js'); jsTestLog("Waiting for the other high priority node to become PRIMARY."); var expectedNewPrimary = replTest.nodes[expectedNewPrimaryIndex]; replTest.waitForState(expectedNewPrimary, ReplSetTest.State.PRIMARY); + replTest.stopSet(); })(); diff --git a/jstests/replsets/protocol_version_upgrade_downgrade.js b/jstests/replsets/protocol_version_upgrade_downgrade.js index 06bd26f2d94..8233babe999 100644 --- a/jstests/replsets/protocol_version_upgrade_downgrade.js +++ b/jstests/replsets/protocol_version_upgrade_downgrade.js @@ -88,5 +88,6 @@ load("jstests/replsets/rslib.js"); res = primary.adminCommand({replSetGetStatus: 1}); assert.commandWorked(res); assert.eq(res.members[0].optime.ts, null); + rst.stopSet(); })(); diff --git a/jstests/replsets/read_committed.js b/jstests/replsets/read_committed.js index 22424ce020a..899778dd7b5 100644 --- a/jstests/replsets/read_committed.js +++ b/jstests/replsets/read_committed.js @@ -172,4 +172,5 @@ load("jstests/replsets/rslib.js"); // For startSetIfSupportsReadMajority. assert.eq(doCommittedRead(secondaryColl), test.expectedAfter); } } + replTest.stopSet(); }()); diff --git a/jstests/replsets/read_committed_after_rollback.js b/jstests/replsets/read_committed_after_rollback.js index 9276449b488..68a80b7bdda 100644 --- a/jstests/replsets/read_committed_after_rollback.js +++ b/jstests/replsets/read_committed_after_rollback.js @@ -150,4 +150,5 @@ load("jstests/replsets/rslib.js"); // For startSetIfSupportsReadMajority. // Verify data consistency between nodes. replTest.checkReplicatedDataHashes(); replTest.checkOplogs(); + replTest.stopSet(); }()); diff --git a/jstests/replsets/read_committed_lookup.js b/jstests/replsets/read_committed_lookup.js index 7e7f1f47ae3..1f4ea4452f9 100644 --- a/jstests/replsets/read_committed_lookup.js +++ b/jstests/replsets/read_committed_lookup.js @@ -41,4 +41,5 @@ load("jstests/libs/read_committed_lib.js"); // For testReadCommittedLookup testReadCommittedLookup(rst.getPrimary().getDB("test"), shardSecondary, rst); + rst.stopSet(); })(); diff --git a/jstests/replsets/read_committed_no_snapshots.js b/jstests/replsets/read_committed_no_snapshots.js index 120129f3a57..ce83b2e2247 100644 --- a/jstests/replsets/read_committed_no_snapshots.js +++ b/jstests/replsets/read_committed_no_snapshots.js @@ -80,4 +80,5 @@ load("jstests/replsets/rslib.js"); // For reconfig and startSetIfSupportsReadMa // Ensure maxTimeMS times out while waiting for this snapshot assert.commandFailed(primary.getSiblingDB(name).foo.runCommand( 'find', {"readConcern": {"level": "majority"}, "maxTimeMS": 1000})); + replTest.stopSet(); })(); diff --git a/jstests/replsets/read_committed_with_catalog_changes.js b/jstests/replsets/read_committed_with_catalog_changes.js index 8a48593ec3b..00a73c72161 100644 --- a/jstests/replsets/read_committed_with_catalog_changes.js +++ b/jstests/replsets/read_committed_with_catalog_changes.js @@ -349,4 +349,6 @@ load("jstests/replsets/rslib.js"); // For startSetIfSupportsReadMajority. threads.forEach(thread => thread.join()); } } + + replTest.stopSet(); }()); diff --git a/jstests/replsets/rename_collection_temp.js b/jstests/replsets/rename_collection_temp.js index 3add505a4f6..c52808b14fd 100644 --- a/jstests/replsets/rename_collection_temp.js +++ b/jstests/replsets/rename_collection_temp.js @@ -75,4 +75,6 @@ replTest.awaitReplication(); checkCollectionTemp(secondaryFoo, "permanentColl", false); + + replTest.stopSet(); }()); diff --git a/jstests/replsets/replset6.js b/jstests/replsets/replset6.js index 4afd7268bf7..c0419f3c4db 100644 --- a/jstests/replsets/replset6.js +++ b/jstests/replsets/replset6.js @@ -65,3 +65,4 @@ assert.eq(1, s.getDB(second).two.findOne().a); // Make sure the source collection no longer exists. assert.eq(-1, s.getDB(first).getCollectionNames().indexOf("one")); +rt.stopSet(); diff --git a/jstests/replsets/replset8.js b/jstests/replsets/replset8.js index 8027ce72a2b..23169a2ff6a 100644 --- a/jstests/replsets/replset8.js +++ b/jstests/replsets/replset8.js @@ -82,4 +82,5 @@ slave.getDB('d')['c'].count() + ')'); jsTestLog("finished"); + rt.stopSet(); })(); diff --git a/jstests/replsets/replsetprio1.js b/jstests/replsets/replsetprio1.js index 7ee42a18a64..dc2d5295e4e 100644 --- a/jstests/replsets/replsetprio1.js +++ b/jstests/replsets/replsetprio1.js @@ -51,4 +51,5 @@ assert(master.getDB("foo").bar.findOne({i: i}) != null, 'checking ' + i); assert(master.getDB("bar").baz.findOne({i: i}) != null, 'checking ' + i); } + replTest.stopSet(); }()); diff --git a/jstests/replsets/replsetrestart1.js b/jstests/replsets/replsetrestart1.js index 870cdcfe233..388de3e1b71 100644 --- a/jstests/replsets/replsetrestart1.js +++ b/jstests/replsets/replsetrestart1.js @@ -66,4 +66,5 @@ replTest.awaitSecondaryNodes(); var config2 = master.getDB("local").system.replset.findOne(); compare_configs(config1, config2); + replTest.stopSet(); }()); diff --git a/jstests/replsets/replsets_killop.js b/jstests/replsets/replsets_killop.js index 7d31f313633..4e41046f8c8 100644 --- a/jstests/replsets/replsets_killop.js +++ b/jstests/replsets/replsets_killop.js @@ -68,3 +68,4 @@ function allReplicated() { // Wait for the correct number of (replicated) documents to be present on the secondary. assert.soon(allReplicated, "didn't replicate all docs", 5 * 60 * 1000); +replTest.stopSet(); diff --git a/jstests/replsets/request_primary_stepdown.js b/jstests/replsets/request_primary_stepdown.js index b9997e03a23..2b95377a153 100644 --- a/jstests/replsets/request_primary_stepdown.js +++ b/jstests/replsets/request_primary_stepdown.js @@ -41,5 +41,5 @@ assert.eq(logContents.indexOf("stepdown period must be longer than secondaryCatchUpPeriodSecs"), -1, "_requestRemotePrimaryStepDown sent an invalid replSetStepDown command"); - + replSet.stopSet(); })(); diff --git a/jstests/replsets/restore_term.js b/jstests/replsets/restore_term.js index b5bb7b013bd..a303d92d0db 100644 --- a/jstests/replsets/restore_term.js +++ b/jstests/replsets/restore_term.js @@ -64,4 +64,5 @@ load("jstests/replsets/rslib.js"); // After restart, the new primary stands up with the newer term. assert.gte(getCurrentTerm(primary), firstSuccessfulTerm + 1); + rst.stopSet(); })(); diff --git a/jstests/replsets/rollback_with_socket_error_then_steady_state.js b/jstests/replsets/rollback_with_socket_error_then_steady_state.js index eb498fe89a5..c2be45aa969 100644 --- a/jstests/replsets/rollback_with_socket_error_then_steady_state.js +++ b/jstests/replsets/rollback_with_socket_error_then_steady_state.js @@ -137,5 +137,6 @@ // Verify data consistency between nodes. rst.checkReplicatedDataHashes(); rst.checkOplogs(); + rst.stopSet(); }()); diff --git a/jstests/replsets/single_server_majority.js b/jstests/replsets/single_server_majority.js index c36f021c989..c7c2ec862f4 100644 --- a/jstests/replsets/single_server_majority.js +++ b/jstests/replsets/single_server_majority.js @@ -9,4 +9,5 @@ col = db.getCollection("single_server_majority"); col.drop(); // see if we can get a majority write on this single server -assert.writeOK(col.save({a: "test"}, {writeConcern: {w: 'majority'}}));
\ No newline at end of file +assert.writeOK(col.save({a: "test"}, {writeConcern: {w: 'majority'}})); +MongoRunner.stopMongod(mongod);
\ No newline at end of file diff --git a/jstests/replsets/startParallelShell.js b/jstests/replsets/startParallelShell.js index b04e4abf2f3..0027c5600e3 100644 --- a/jstests/replsets/startParallelShell.js +++ b/jstests/replsets/startParallelShell.js @@ -32,4 +32,5 @@ var db; return db.coll0.find({test: "explicit port"}).count() === 1; }); awaitShell(); + replSet.stopSet(); })(); diff --git a/jstests/replsets/step_down_during_draining.js b/jstests/replsets/step_down_during_draining.js index 0ea89a27275..03f6a29d58f 100644 --- a/jstests/replsets/step_down_during_draining.js +++ b/jstests/replsets/step_down_during_draining.js @@ -130,4 +130,5 @@ load("jstests/replsets/rslib.js"); // Check that all writes reached the secondary's op queue prior to // stepping down the original primary and got applied. assert.eq(secondary.getDB("foo").foo.find().itcount(), numDocuments); + replSet.stopSet(); })(); diff --git a/jstests/replsets/step_down_during_draining2.js b/jstests/replsets/step_down_during_draining2.js index 611a80872bb..2d91910fbca 100644 --- a/jstests/replsets/step_down_during_draining2.js +++ b/jstests/replsets/step_down_during_draining2.js @@ -170,4 +170,5 @@ assert.writeOK(secondary.getDB("foo").flag.insert({sentinel: 1}, {writeConcern: {w: 3}})); // Check that no writes were lost. assert.eq(secondary.getDB("foo").foo.find().itcount(), numDocuments); + replSet.stopSet(); })(); diff --git a/jstests/replsets/step_down_during_draining3.js b/jstests/replsets/step_down_during_draining3.js index a9148eb5b44..b62e288e6d8 100644 --- a/jstests/replsets/step_down_during_draining3.js +++ b/jstests/replsets/step_down_during_draining3.js @@ -126,4 +126,5 @@ assert.soon(function() { return secondary.getDB("foo").foo.find().itcount() == numDocuments; }); + replSet.stopSet(); })(); diff --git a/jstests/replsets/stepdown_kill_other_ops.js b/jstests/replsets/stepdown_kill_other_ops.js index a1e7e49c380..2974ef3624e 100644 --- a/jstests/replsets/stepdown_kill_other_ops.js +++ b/jstests/replsets/stepdown_kill_other_ops.js @@ -70,4 +70,5 @@ var exitCode = evalRunner({checkExitSuccess: false}); assert.neq( 0, exitCode, "expected shell to exit abnormally due to JS execution being terminated"); + replSet.stopSet(); })(); diff --git a/jstests/replsets/stepdown_killop.js b/jstests/replsets/stepdown_killop.js index ebdd3f8ea6a..013ed9161e8 100644 --- a/jstests/replsets/stepdown_killop.js +++ b/jstests/replsets/stepdown_killop.js @@ -78,4 +78,5 @@ assert.writeOK(primary.getDB(name).foo.remove({})); restartServerReplication(secondary); + replSet.stopSet(); })(); diff --git a/jstests/replsets/stepdown_long_wait_time.js b/jstests/replsets/stepdown_long_wait_time.js index d6c869e7566..2b0c0def919 100644 --- a/jstests/replsets/stepdown_long_wait_time.js +++ b/jstests/replsets/stepdown_long_wait_time.js @@ -72,4 +72,5 @@ jsTestLog("Wait for SECONDARY " + secondary.host + " to become PRIMARY"); replSet.waitForState(secondary, ReplSetTest.State.PRIMARY); + replSet.stopSet(); })(); diff --git a/jstests/replsets/stepup.js b/jstests/replsets/stepup.js index 0e89fc25252..f50e6d2d8ab 100644 --- a/jstests/replsets/stepup.js +++ b/jstests/replsets/stepup.js @@ -56,4 +56,5 @@ load("jstests/replsets/rslib.js"); // Make sure the step up succeeded. assert.eq(secondary, rst.getPrimary()); + rst.stopSet(); })(); diff --git a/jstests/replsets/sync_passive.js b/jstests/replsets/sync_passive.js index 321a198e9af..fed5c027201 100644 --- a/jstests/replsets/sync_passive.js +++ b/jstests/replsets/sync_passive.js @@ -79,3 +79,5 @@ replTest.awaitReplication(); print("bring #1 back up, make sure everything's okay"); replTest.restart(1); + +replTest.stopSet();
\ No newline at end of file diff --git a/jstests/replsets/system_profile.js b/jstests/replsets/system_profile.js index ae524df1c75..7e1250da6dd 100644 --- a/jstests/replsets/system_profile.js +++ b/jstests/replsets/system_profile.js @@ -45,4 +45,5 @@ assert.eq( op, getLatestOp(), "oplog entry created when system.profile was emptied via emptycapped"); assert(primaryDB.system.profile.drop()); + rst.stopSet(); })(); diff --git a/jstests/replsets/system_profile_secondary.js b/jstests/replsets/system_profile_secondary.js index 69ab259f191..7c62e126323 100644 --- a/jstests/replsets/system_profile_secondary.js +++ b/jstests/replsets/system_profile_secondary.js @@ -22,4 +22,5 @@ jsTestLog('Check the query is in the profile and turn profiling off.'); assert.eq(numProfileEntries(secondaryDB.doesntexist), 1, 'expected a single profile entry'); assert.commandWorked(secondaryDB.runCommand({profile: 0})); + rst.stopSet(); })(); diff --git a/jstests/replsets/test_command.js b/jstests/replsets/test_command.js index abaf10bc56d..cc4ef0f0d0f 100644 --- a/jstests/replsets/test_command.js +++ b/jstests/replsets/test_command.js @@ -141,4 +141,5 @@ waitForDrainFinish: 0, }), 'node 1' + primary.host + ' failed to wait for drain to finish'); + replSet.stopSet(); })(); diff --git a/jstests/replsets/user_management_wc.js b/jstests/replsets/user_management_wc.js index f2f276c46ff..a0796b4fcbf 100644 --- a/jstests/replsets/user_management_wc.js +++ b/jstests/replsets/user_management_wc.js @@ -136,4 +136,5 @@ load('jstests/multiVersion/libs/auth_helpers.js'); testInvalidWriteConcern(cmd); }); + replTest.stopSet(); })(); |