summaryrefslogtreecommitdiff
path: root/jstests/hooks
diff options
context:
space:
mode:
authorDianna Hohensee <dianna.hohensee@mongodb.com>2019-11-26 13:28:34 +0000
committerevergreen <evergreen@mongodb.com>2019-11-26 13:28:34 +0000
commit03f3b000c26146a8194bebb6124623ac0ebf20ec (patch)
tree0ef19ad5a30795c8d09e9624fe81d194e7431b3d /jstests/hooks
parentd471957fc37ef6cafe9ffeda3e231cdc871c3ce3 (diff)
downloadmongo-03f3b000c26146a8194bebb6124623ac0ebf20ec.tar.gz
SERVER-44613 ValidateCollections hook must always set the expected FCV prior to starting
Diffstat (limited to 'jstests/hooks')
-rw-r--r--jstests/hooks/validate_collections.js7
1 files changed, 3 insertions, 4 deletions
diff --git a/jstests/hooks/validate_collections.js b/jstests/hooks/validate_collections.js
index 9f4a9e8fc5f..b0bc3461ddf 100644
--- a/jstests/hooks/validate_collections.js
+++ b/jstests/hooks/validate_collections.js
@@ -138,10 +138,9 @@ function CollectionValidator() {
checkFCV(adminDB, originalFCV.targetVersion);
}
- if (originalFCV.version !== requiredFCV && originalFCV.targetVersion !== requiredFCV) {
- assert.commandWorked(
- adminDB.runCommand({setFeatureCompatibilityVersion: requiredFCV}));
- }
+ // Now that we are certain that an upgrade or downgrade of the FCV is not in progress,
+ // ensure the 'requiredFCV' is set.
+ assert.commandWorked(adminDB.runCommand({setFeatureCompatibilityVersion: requiredFCV}));
}
try {