0
0
mirror of https://github.com/mongodb/mongo.git synced 2024-12-01 09:32:32 +01:00

SERVER-54674 Use separate replica set test fixtures for each test run in awaitable_hello_fcv_change.js

This commit is contained in:
Ali Mir 2021-02-23 18:59:42 +00:00 committed by Evergreen Agent
parent 674ab8d343
commit 46d914bc91

View File

@ -10,15 +10,6 @@
load("jstests/libs/parallel_shell_helpers.js");
load("jstests/libs/fail_point_util.js");
const rst = new ReplSetTest({nodes: [{}, {rsConfig: {priority: 0, votes: 0}}]});
rst.startSet();
rst.initiate();
const primary = rst.getPrimary();
const secondary = rst.getSecondary();
const primaryAdminDB = primary.getDB("admin");
const secondaryAdminDB = secondary.getDB("admin");
function runAwaitableHelloBeforeFCVChange(
topologyVersionField, targetFCV, isPrimary, prevMinWireVersion, serverMaxWireVersion) {
const isUseSecondaryDelaySecsEnabled = db.adminCommand({
@ -77,6 +68,15 @@ function runAwaitableHelloBeforeFCVChange(
function runTest(downgradeFCV) {
jsTestLog("Running test with downgradeFCV: " + downgradeFCV);
const rst = new ReplSetTest({nodes: [{}, {rsConfig: {priority: 0, votes: 0}}]});
rst.startSet();
rst.initiate();
const primary = rst.getPrimary();
const secondary = rst.getSecondary();
const primaryAdminDB = primary.getDB("admin");
const secondaryAdminDB = secondary.getDB("admin");
// This test manually runs hello with the 'internalClient' field, which means that to the
// mongod, the connection appears to be from another server. This makes mongod to return an
// hello response with a real 'minWireVersion' for internal clients instead of 0.
@ -334,10 +334,9 @@ function runTest(downgradeFCV) {
secondaryAdminDB.serverStatus().connections.awaitingTopologyChanges;
assert.eq(0, numAwaitingTopologyChangeOnPrimary);
assert.eq(0, numAwaitingTopologyChangeOnSecondary);
rst.stopSet();
}
runTest(lastLTSFCV);
runTest(lastContinuousFCV);
rst.stopSet();
})();