diff --git a/jstests/multiVersion/genericBinVersion/query-integration-timeseries/timeseries_dollar_prefixed_timefield_errors.js b/jstests/multiVersion/genericBinVersion/query-integration-timeseries/timeseries_dollar_prefixed_timefield_errors.js index fb37c823a8c..c97d96d926b 100644 --- a/jstests/multiVersion/genericBinVersion/query-integration-timeseries/timeseries_dollar_prefixed_timefield_errors.js +++ b/jstests/multiVersion/genericBinVersion/query-integration-timeseries/timeseries_dollar_prefixed_timefield_errors.js @@ -136,14 +136,16 @@ function assertCollectionsQueryable(db) { } testPerformReplSetRollingRestart({ - // support for $-prefixed timeField/metaField was removed in 8.3 + // Support for $-prefixed timeField/metaField was removed in v8.3. startingVersion: {binVersion: "last-lts"}, setupFn: setUp, beforeRestart: () => {}, - afterSecondariesHaveRestarted: (primaryConnection, originalPrimary) => { - // Create on the node that wasn't restarted (still on last-lts). - assertCreateDollarCollectionsWorks(getDB(originalPrimary)); - assertCollectionsQueryable(getDB(primaryConnection)); + afterSecondariesHaveRestarted: (primaryConnection) => { + // Check that collections can be created and queried while secondaries are on the new + // version and primaries are on the old version. + const db = getDB(primaryConnection); + assertCreateDollarCollectionsWorks(db); + assertCollectionsQueryable(db); }, afterPrimariesHaveRestarted: (primaryConnection) => { const db = getDB(primaryConnection); diff --git a/jstests/multiVersion/libs/mixed_version_fixture_test.js b/jstests/multiVersion/libs/mixed_version_fixture_test.js index d925a15f737..7283a2a6f88 100644 --- a/jstests/multiVersion/libs/mixed_version_fixture_test.js +++ b/jstests/multiVersion/libs/mixed_version_fixture_test.js @@ -52,6 +52,9 @@ export function testPerformReplSetRollingRestart({ { ...startingVersion, }, + { + ...startingVersion, + }, ], // Create a copy of the options since the callee may modify them. nodeOptions: copyJSON(startingNodeOptions), @@ -76,15 +79,11 @@ export function testPerformReplSetRollingRestart({ " and options " + tojsononeline(restartNodeOptions), ); - // Save a reference to the node that was primary before restarting secondaries. Pass it to the - // callback so tests can run operations that only the old version supports; the current primary - // after upgradeSecondaries() may be the restarted node in a 2-node set. - const originalPrimary = primaryConnection; rst.upgradeSecondaries({...restartVersion, ...copyJSON(restartNodeOptions)}); primaryConnection = rst.getPrimary(); jsTest.log.info("Calling the afterSecondariesHaveRestarted function"); - afterSecondariesHaveRestarted(primaryConnection, originalPrimary); + afterSecondariesHaveRestarted(primaryConnection); // TODO SERVER-109457 Try a scenario where you force election here so that the restarted // secondary could become primary while another active secondary has not restarted yet. This