summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRuoxin Xu <ruoxin.xu@mongodb.com>2021-05-27 12:34:02 +0100
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2021-05-27 19:02:24 +0000
commit8d9b4050768161c8fb41b3542c7c5f2f9304f314 (patch)
tree116e0b956e6a904d9bdb63519e15cfd21b10c1c8
parentdd53f7efa0b21f56188c4c058316c7cbf51bc62e (diff)
downloadmongo-8d9b4050768161c8fb41b3542c7c5f2f9304f314.tar.gz
SERVER-57237 Ensure that the cluster is stable after upgrade in hiddenIndexes.js
-rw-r--r--jstests/multiVersion/hiddenIndexes.js15
1 files changed, 9 insertions, 6 deletions
diff --git a/jstests/multiVersion/hiddenIndexes.js b/jstests/multiVersion/hiddenIndexes.js
index f6efbe7cf29..60ba097a8b1 100644
--- a/jstests/multiVersion/hiddenIndexes.js
+++ b/jstests/multiVersion/hiddenIndexes.js
@@ -211,8 +211,9 @@ try {
st.rs0.start(secondaryNodeOfShard,
Object.assign(nodeOptionsLatest, {startClean: true, shardsvr: ""}));
st.rs0.awaitReplication();
-st.upgradeCluster(nodeOptionsLatest.binVersion,
- {upgradeMongos: true, upgradeShards: false, upgradeConfigs: false});
+st.upgradeCluster(
+ nodeOptionsLatest.binVersion,
+ {upgradeMongos: true, upgradeShards: false, upgradeConfigs: false, waitUntilStable: true});
})();
//
@@ -221,7 +222,7 @@ st.upgradeCluster(nodeOptionsLatest.binVersion,
(function() {
mongosDB = st.s.getDB(kDbName);
coll = mongosDB.coll;
-coll.dropIndexes();
+assert.commandWorked(coll.dropIndexes());
assert.commandWorked(coll.insert({s: 1, t: 1}));
assert.commandWorked(mongosDB.adminCommand({setFeatureCompatibilityVersion: latestFCV}));
@@ -236,11 +237,13 @@ assert.commandWorked(mongosDB.runCommand({
"index": {"name": "t_1", "hidden": false},
}));
-assert.commandWorked(st.s.adminCommand({setFeatureCompatibilityVersion: lastStableFCV}));
+assert.commandWorked(mongosDB.adminCommand({setFeatureCompatibilityVersion: lastStableFCV}));
+assertVersionAndFCV(["4.4", "4.3"], lastStableFCV);
// Test that we can downgrade the cluster to 4.2.
-st.upgradeCluster(nodeOptionsLastStable.binVersion,
- {upgradeMongos: true, upgradeShards: true, upgradeConfigs: true});
+st.upgradeCluster(
+ nodeOptionsLastStable.binVersion,
+ {upgradeMongos: true, upgradeShards: true, upgradeConfigs: true, waitUntilStable: true});
mongosDB = st.s.getDB(kDbName);
coll = mongosDB.coll;