summaryrefslogtreecommitdiff
path: root/jstests/hooks/validate_collections.js
diff options
context:
space:
mode:
Diffstat (limited to 'jstests/hooks/validate_collections.js')
-rw-r--r--jstests/hooks/validate_collections.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/jstests/hooks/validate_collections.js b/jstests/hooks/validate_collections.js
index cf7f1be9707..01275869617 100644
--- a/jstests/hooks/validate_collections.js
+++ b/jstests/hooks/validate_collections.js
@@ -84,7 +84,7 @@ function CollectionValidator() {
};
// Run a separate thread to validate collections on each server in parallel.
- const validateCollectionsThread = function(validatorFunc, host) {
+ const validateCollectionsThread = function(validatorFunc, host, skipFCV) {
try {
print('Running validate() on ' + host);
const conn = new Mongo(host);
@@ -98,7 +98,7 @@ function CollectionValidator() {
}
const requiredFCV = jsTest.options().forceValidationWithFeatureCompatibilityVersion;
- if (requiredFCV) {
+ if (requiredFCV && !skipFCV) {
// Make sure this node has the desired FCV as it may take time for the updates to
// replicate to the nodes that weren't part of the w=majority.
assert.soonNoExcept(() => {
@@ -122,7 +122,7 @@ function CollectionValidator() {
}
};
- this.validateNodes = function(hostList) {
+ this.validateNodes = function(hostList, skipFCV) {
// We run the scoped threads in a try/finally block in case any thread throws an exception,
// in which case we want to still join all the threads.
let threads = [];
@@ -130,7 +130,7 @@ function CollectionValidator() {
try {
hostList.forEach(host => {
const thread =
- new Thread(validateCollectionsThread, this.validateCollections, host);
+ new Thread(validateCollectionsThread, this.validateCollections, host, skipFCV);
threads.push(thread);
thread.start();
});