diff options
47 files changed, 6 insertions, 61 deletions
diff --git a/jstests/concurrency/fsm_workloads/database_versioning.js b/jstests/concurrency/fsm_workloads/database_versioning.js index e387880f179..93331798908 100644 --- a/jstests/concurrency/fsm_workloads/database_versioning.js +++ b/jstests/concurrency/fsm_workloads/database_versioning.js @@ -7,8 +7,6 @@ * @tags: [requires_sharding] */ -load("jstests/libs/feature_compatibility_version.js"); // For lastStableFCV and latestFCV. - var $config = (function() { var states = (function() { function init(db, collName) { diff --git a/jstests/core/txns/abort_unprepared_transactions_on_FCV_downgrade.js b/jstests/core/txns/abort_unprepared_transactions_on_FCV_downgrade.js index e17cdbc5631..b7a96a089bd 100644 --- a/jstests/core/txns/abort_unprepared_transactions_on_FCV_downgrade.js +++ b/jstests/core/txns/abort_unprepared_transactions_on_FCV_downgrade.js @@ -6,7 +6,6 @@ */ (function() { "use strict"; -load("jstests/libs/feature_compatibility_version.js"); const dbName = "test"; const collName = "abort_unprepared_transactions_on_FCV_downgrade"; diff --git a/jstests/core/txns/await_prepared_transactions_on_FCV_downgrade.js b/jstests/core/txns/await_prepared_transactions_on_FCV_downgrade.js index 316ce25d110..4a23d990e20 100644 --- a/jstests/core/txns/await_prepared_transactions_on_FCV_downgrade.js +++ b/jstests/core/txns/await_prepared_transactions_on_FCV_downgrade.js @@ -6,7 +6,6 @@ */ (function() { "use strict"; -load("jstests/libs/feature_compatibility_version.js"); load("jstests/core/txns/libs/prepare_helpers.js"); const dbName = "test"; diff --git a/jstests/hooks/validate_collections.js b/jstests/hooks/validate_collections.js index cce0cd61185..879f249f42f 100644 --- a/jstests/hooks/validate_collections.js +++ b/jstests/hooks/validate_collections.js @@ -2,7 +2,6 @@ 'use strict'; function CollectionValidator() { - load('jstests/libs/feature_compatibility_version.js'); load('jstests/libs/parallelTester.js'); if (!(this instanceof CollectionValidator)) { @@ -87,8 +86,6 @@ function CollectionValidator() { // Run a separate thread to validate collections on each server in parallel. const validateCollectionsThread = function(validatorFunc, host) { try { - load('jstests/libs/feature_compatibility_version.js'); - print('Running validate() on ' + host); const conn = new Mongo(host); conn.setSlaveOk(); diff --git a/jstests/multiVersion/change_streams_multi_version_transaction.js b/jstests/multiVersion/change_streams_multi_version_transaction.js index 0ec28a63235..591233bc374 100644 --- a/jstests/multiVersion/change_streams_multi_version_transaction.js +++ b/jstests/multiVersion/change_streams_multi_version_transaction.js @@ -6,7 +6,6 @@ (function() { "use strict"; -load("jstests/libs/feature_compatibility_version.js"); load('jstests/multiVersion/libs/multi_rs.js'); // For upgradeSet. load("jstests/replsets/rslib.js"); // For startSetIfSupportsReadMajority. diff --git a/jstests/multiVersion/genericSetFCVUsage/collection_validator_feature_compatibility_version.js b/jstests/multiVersion/genericSetFCVUsage/collection_validator_feature_compatibility_version.js index 646619f5e42..8391c3a1350 100644 --- a/jstests/multiVersion/genericSetFCVUsage/collection_validator_feature_compatibility_version.js +++ b/jstests/multiVersion/genericSetFCVUsage/collection_validator_feature_compatibility_version.js @@ -9,8 +9,6 @@ (function() { "use strict"; -load("jstests/libs/feature_compatibility_version.js"); - const testName = "collection_validator_feature_compatibility_version"; const dbpath = MongoRunner.dataPath + testName; diff --git a/jstests/multiVersion/genericSetFCVUsage/crash_mongos_against_upgraded_cluster.js b/jstests/multiVersion/genericSetFCVUsage/crash_mongos_against_upgraded_cluster.js index d99751967ab..b99b2a60f4f 100644 --- a/jstests/multiVersion/genericSetFCVUsage/crash_mongos_against_upgraded_cluster.js +++ b/jstests/multiVersion/genericSetFCVUsage/crash_mongos_against_upgraded_cluster.js @@ -10,8 +10,6 @@ TestData.skipCheckingUUIDsConsistentAcrossCluster = true; (function() { "use strict"; -load("jstests/libs/feature_compatibility_version.js"); - const lastStable = "last-stable"; let st = new ShardingTest({mongos: 1, shards: 1}); diff --git a/jstests/multiVersion/genericSetFCVUsage/do_upgrade_downgrade.js b/jstests/multiVersion/genericSetFCVUsage/do_upgrade_downgrade.js index 3faf6a704b5..addccabd15d 100644 --- a/jstests/multiVersion/genericSetFCVUsage/do_upgrade_downgrade.js +++ b/jstests/multiVersion/genericSetFCVUsage/do_upgrade_downgrade.js @@ -4,7 +4,6 @@ "use strict"; load("jstests/replsets/rslib.js"); -load("jstests/libs/feature_compatibility_version.js"); load("jstests/libs/get_index_helpers.js"); load("jstests/libs/check_uuids.js"); load("jstests/libs/check_unique_indexes.js"); diff --git a/jstests/multiVersion/genericSetFCVUsage/downgrade_after_rollback_via_refetch.js b/jstests/multiVersion/genericSetFCVUsage/downgrade_after_rollback_via_refetch.js index f031ac47b5e..d3ffe4a3b48 100644 --- a/jstests/multiVersion/genericSetFCVUsage/downgrade_after_rollback_via_refetch.js +++ b/jstests/multiVersion/genericSetFCVUsage/downgrade_after_rollback_via_refetch.js @@ -5,7 +5,6 @@ (function() { "use strict"; -load("jstests/libs/feature_compatibility_version.js"); load("jstests/replsets/libs/rollback_test.js"); TestData.rollbackShutdowns = true; diff --git a/jstests/multiVersion/genericSetFCVUsage/downgrade_replset.js b/jstests/multiVersion/genericSetFCVUsage/downgrade_replset.js index 95a4a7a8874..96d9c7eeb5b 100644 --- a/jstests/multiVersion/genericSetFCVUsage/downgrade_replset.js +++ b/jstests/multiVersion/genericSetFCVUsage/downgrade_replset.js @@ -3,7 +3,6 @@ load('./jstests/multiVersion/libs/multi_rs.js'); load('./jstests/libs/test_background_ops.js'); -load('./jstests/libs/feature_compatibility_version.js'); let newVersion = "latest"; let oldVersion = "last-stable"; diff --git a/jstests/multiVersion/genericSetFCVUsage/feature_compatibility_version_lagging_secondary.js b/jstests/multiVersion/genericSetFCVUsage/feature_compatibility_version_lagging_secondary.js index 2148a26111e..0d06214c7b9 100644 --- a/jstests/multiVersion/genericSetFCVUsage/feature_compatibility_version_lagging_secondary.js +++ b/jstests/multiVersion/genericSetFCVUsage/feature_compatibility_version_lagging_secondary.js @@ -3,7 +3,6 @@ (function() { "use strict"; -load("jstests/libs/feature_compatibility_version.js"); load("jstests/libs/write_concern_util.js"); const latest = "latest"; diff --git a/jstests/multiVersion/genericSetFCVUsage/initial_sync_last_stable_from_latest.js b/jstests/multiVersion/genericSetFCVUsage/initial_sync_last_stable_from_latest.js index f222068dba6..7172cb2efef 100644 --- a/jstests/multiVersion/genericSetFCVUsage/initial_sync_last_stable_from_latest.js +++ b/jstests/multiVersion/genericSetFCVUsage/initial_sync_last_stable_from_latest.js @@ -5,7 +5,6 @@ 'use strict'; -load("./jstests/libs/feature_compatibility_version.js"); load("./jstests/multiVersion/libs/initial_sync.js"); var testName = "multiversion_initial_sync_last_stable_from_latest"; diff --git a/jstests/multiVersion/genericSetFCVUsage/initial_sync_latest_from_last_stable.js b/jstests/multiVersion/genericSetFCVUsage/initial_sync_latest_from_last_stable.js index 033d7c1511e..14d2a690c1c 100644 --- a/jstests/multiVersion/genericSetFCVUsage/initial_sync_latest_from_last_stable.js +++ b/jstests/multiVersion/genericSetFCVUsage/initial_sync_latest_from_last_stable.js @@ -5,7 +5,6 @@ 'use strict'; -load("./jstests/libs/feature_compatibility_version.js"); load("./jstests/multiVersion/libs/initial_sync.js"); var testName = "multiversion_initial_sync_latest_from_last_stable"; diff --git a/jstests/multiVersion/genericSetFCVUsage/migration_between_mixed_FCV_mixed_version_mongods.js b/jstests/multiVersion/genericSetFCVUsage/migration_between_mixed_FCV_mixed_version_mongods.js index b2b2aee05ad..cee8e07ad71 100644 --- a/jstests/multiVersion/genericSetFCVUsage/migration_between_mixed_FCV_mixed_version_mongods.js +++ b/jstests/multiVersion/genericSetFCVUsage/migration_between_mixed_FCV_mixed_version_mongods.js @@ -6,8 +6,6 @@ (function() { "use strict"; -load("jstests/libs/feature_compatibility_version.js"); - let st = new ShardingTest({ shards: [{binVersion: "latest"}, {binVersion: "last-stable"}], mongos: {binVersion: "latest"}, diff --git a/jstests/multiVersion/genericSetFCVUsage/rename_across_dbs_last_stable_primary.js b/jstests/multiVersion/genericSetFCVUsage/rename_across_dbs_last_stable_primary.js index 48e710d330d..11dcd2ee9f3 100644 --- a/jstests/multiVersion/genericSetFCVUsage/rename_across_dbs_last_stable_primary.js +++ b/jstests/multiVersion/genericSetFCVUsage/rename_across_dbs_last_stable_primary.js @@ -1,7 +1,6 @@ (function() { 'use strict'; -load("jstests/libs/feature_compatibility_version.js"); load("jstests/replsets/libs/rename_across_dbs.js"); const nodes = [{binVersion: 'last-stable'}, {binVersion: 'latest'}, {}]; diff --git a/jstests/multiVersion/genericSetFCVUsage/rename_across_dbs_last_stable_primary_drop_target.js b/jstests/multiVersion/genericSetFCVUsage/rename_across_dbs_last_stable_primary_drop_target.js index a1e5869800d..acaff7af4ff 100644 --- a/jstests/multiVersion/genericSetFCVUsage/rename_across_dbs_last_stable_primary_drop_target.js +++ b/jstests/multiVersion/genericSetFCVUsage/rename_across_dbs_last_stable_primary_drop_target.js @@ -1,7 +1,6 @@ (function() { 'use strict'; -load("jstests/libs/feature_compatibility_version.js"); load("jstests/replsets/libs/rename_across_dbs.js"); const nodes = [{binVersion: 'last-stable'}, {binVersion: 'latest'}, {}]; diff --git a/jstests/multiVersion/genericSetFCVUsage/rename_across_dbs_last_stable_secondary.js b/jstests/multiVersion/genericSetFCVUsage/rename_across_dbs_last_stable_secondary.js index 2fb9c126ca6..1e32fbe4fbd 100644 --- a/jstests/multiVersion/genericSetFCVUsage/rename_across_dbs_last_stable_secondary.js +++ b/jstests/multiVersion/genericSetFCVUsage/rename_across_dbs_last_stable_secondary.js @@ -1,7 +1,6 @@ (function() { 'use strict'; -load("jstests/libs/feature_compatibility_version.js"); load("jstests/replsets/libs/rename_across_dbs.js"); const nodes = [{binVersion: 'latest'}, {binVersion: 'last-stable'}, {}]; diff --git a/jstests/multiVersion/genericSetFCVUsage/rename_across_dbs_last_stable_secondary_drop_target.js b/jstests/multiVersion/genericSetFCVUsage/rename_across_dbs_last_stable_secondary_drop_target.js index 814fa096f47..fea67053891 100644 --- a/jstests/multiVersion/genericSetFCVUsage/rename_across_dbs_last_stable_secondary_drop_target.js +++ b/jstests/multiVersion/genericSetFCVUsage/rename_across_dbs_last_stable_secondary_drop_target.js @@ -1,7 +1,6 @@ (function() { 'use strict'; -load("jstests/libs/feature_compatibility_version.js"); load("jstests/replsets/libs/rename_across_dbs.js"); const nodes = [{binVersion: 'latest'}, {binVersion: 'last-stable'}, {}]; diff --git a/jstests/multiVersion/genericSetFCVUsage/repair_feature_compatibility_version.js b/jstests/multiVersion/genericSetFCVUsage/repair_feature_compatibility_version.js index d37e40c5816..e9da9ce7735 100644 --- a/jstests/multiVersion/genericSetFCVUsage/repair_feature_compatibility_version.js +++ b/jstests/multiVersion/genericSetFCVUsage/repair_feature_compatibility_version.js @@ -6,8 +6,6 @@ (function() { "use strict"; -load("jstests/libs/feature_compatibility_version.js"); - let dbpath = MongoRunner.dataPath + "feature_compatibility_version"; resetDbpath(dbpath); let connection; diff --git a/jstests/multiVersion/genericSetFCVUsage/setFCV_collmod_transaction_rollback.js b/jstests/multiVersion/genericSetFCVUsage/setFCV_collmod_transaction_rollback.js index 1edb0a61904..cf81f73b8c9 100644 --- a/jstests/multiVersion/genericSetFCVUsage/setFCV_collmod_transaction_rollback.js +++ b/jstests/multiVersion/genericSetFCVUsage/setFCV_collmod_transaction_rollback.js @@ -5,8 +5,6 @@ (function() { 'use strict'; -load("jstests/libs/feature_compatibility_version.js"); - let dbpath = MongoRunner.dataPath + "setFCV_collmod_transaction_rollback"; resetDbpath(dbpath); diff --git a/jstests/multiVersion/genericSetFCVUsage/set_feature_compatibility_version.js b/jstests/multiVersion/genericSetFCVUsage/set_feature_compatibility_version.js index 72b0d90cd15..d7a1c8853f0 100644 --- a/jstests/multiVersion/genericSetFCVUsage/set_feature_compatibility_version.js +++ b/jstests/multiVersion/genericSetFCVUsage/set_feature_compatibility_version.js @@ -12,7 +12,6 @@ TestData.skipCheckDBHashes = true; (function() { "use strict"; -load("jstests/libs/feature_compatibility_version.js"); load("jstests/libs/get_index_helpers.js"); load("jstests/libs/write_concern_util.js"); load("jstests/replsets/rslib.js"); diff --git a/jstests/multiVersion/genericSetFCVUsage/upgrade_downgrade_while_creating_collection.js b/jstests/multiVersion/genericSetFCVUsage/upgrade_downgrade_while_creating_collection.js index e80e36eb624..7d40fb7ad38 100644 --- a/jstests/multiVersion/genericSetFCVUsage/upgrade_downgrade_while_creating_collection.js +++ b/jstests/multiVersion/genericSetFCVUsage/upgrade_downgrade_while_creating_collection.js @@ -3,7 +3,6 @@ */ (function() { "use strict"; -load("jstests/libs/feature_compatibility_version.js"); load("jstests/libs/parallel_shell_helpers.js"); const rst = new ReplSetTest({nodes: 2}); diff --git a/jstests/multiVersion/genericSetFCVUsage/view_definition_feature_compatibility_version.js b/jstests/multiVersion/genericSetFCVUsage/view_definition_feature_compatibility_version.js index be72a724237..25f55158d3b 100644 --- a/jstests/multiVersion/genericSetFCVUsage/view_definition_feature_compatibility_version.js +++ b/jstests/multiVersion/genericSetFCVUsage/view_definition_feature_compatibility_version.js @@ -9,8 +9,6 @@ (function() { "use strict"; -load("jstests/libs/feature_compatibility_version.js"); - const testName = "view_definition_feature_compatibility_version_multiversion"; const dbpath = MongoRunner.dataPath + testName; diff --git a/jstests/multiVersion/long_collection_names.js b/jstests/multiVersion/long_collection_names.js index af9b5509c98..3a1bd66f3ce 100644 --- a/jstests/multiVersion/long_collection_names.js +++ b/jstests/multiVersion/long_collection_names.js @@ -12,7 +12,6 @@ */ (function() { 'use strict'; -load('jstests/libs/feature_compatibility_version.js'); const dbName = 'test'; const renameDbName = 'rename_test'; diff --git a/jstests/multiVersion/remove_ns_field_in_index_spec.js b/jstests/multiVersion/remove_ns_field_in_index_spec.js index 9572fb93e22..00267bb3ecb 100644 --- a/jstests/multiVersion/remove_ns_field_in_index_spec.js +++ b/jstests/multiVersion/remove_ns_field_in_index_spec.js @@ -7,7 +7,6 @@ */ (function() { 'use strict'; -load('jstests/libs/feature_compatibility_version.js'); const dbName = 'test'; const collName = 'coll'; diff --git a/jstests/noPassthrough/apply_ops_mode.js b/jstests/noPassthrough/apply_ops_mode.js index b03edf2c855..bc7d15d3424 100644 --- a/jstests/noPassthrough/apply_ops_mode.js +++ b/jstests/noPassthrough/apply_ops_mode.js @@ -6,7 +6,6 @@ (function() { 'use strict'; -load('jstests/libs/feature_compatibility_version.js'); var standalone = MongoRunner.runMongod(); var db = standalone.getDB("test"); diff --git a/jstests/noPassthrough/apply_ops_overwrite_admin_system_version.js b/jstests/noPassthrough/apply_ops_overwrite_admin_system_version.js index ca679919ab9..81aa503929c 100644 --- a/jstests/noPassthrough/apply_ops_overwrite_admin_system_version.js +++ b/jstests/noPassthrough/apply_ops_overwrite_admin_system_version.js @@ -1,6 +1,5 @@ (function() { "use strict"; -load("jstests/libs/feature_compatibility_version.js"); var standalone = MongoRunner.runMongod(); var adminDB = standalone.getDB("admin"); diff --git a/jstests/noPassthrough/feature_compatibility_version.js b/jstests/noPassthrough/feature_compatibility_version.js index 319b253fa99..a413ac02542 100644 --- a/jstests/noPassthrough/feature_compatibility_version.js +++ b/jstests/noPassthrough/feature_compatibility_version.js @@ -4,8 +4,6 @@ (function() { "use strict"; -load("jstests/libs/feature_compatibility_version.js"); - const conn = MongoRunner.runMongod({}); assert.neq(null, conn, "mongod was unable to start up"); diff --git a/jstests/noPassthrough/unsupported_change_stream_deployments.js b/jstests/noPassthrough/unsupported_change_stream_deployments.js index 6a4d3dcd1c6..6bfa8d1fc33 100644 --- a/jstests/noPassthrough/unsupported_change_stream_deployments.js +++ b/jstests/noPassthrough/unsupported_change_stream_deployments.js @@ -6,7 +6,6 @@ load("jstests/aggregation/extras/utils.js"); // For assertErrorCode. // For supportsMajorityReadConcern(). load("jstests/multiVersion/libs/causal_consistency_helpers.js"); -load("jstests/libs/feature_compatibility_version.js"); // For checkFCV. // Skip this test if running with --nojournal and WiredTiger. if (jsTest.options().noJournal && diff --git a/jstests/noPassthrough/validate_hook_resume_fcv_upgrade.js b/jstests/noPassthrough/validate_hook_resume_fcv_upgrade.js index 4b4cacfbbba..0436853f8cc 100644 --- a/jstests/noPassthrough/validate_hook_resume_fcv_upgrade.js +++ b/jstests/noPassthrough/validate_hook_resume_fcv_upgrade.js @@ -9,8 +9,6 @@ var db; (function() { "use strict"; -load("jstests/libs/feature_compatibility_version.js"); - // We skip doing the data consistency checks while terminating the cluster because they conflict // with the counts of the number of times the "validate" command is run. TestData.skipCollectionAndIndexValidation = true; diff --git a/jstests/noPassthroughWithMongod/isMaster_feature_compatibility_version.js b/jstests/noPassthroughWithMongod/isMaster_feature_compatibility_version.js index a14fecd2d5b..62ba469ba73 100644 --- a/jstests/noPassthroughWithMongod/isMaster_feature_compatibility_version.js +++ b/jstests/noPassthroughWithMongod/isMaster_feature_compatibility_version.js @@ -5,7 +5,6 @@ // (function() { "use strict"; -load('./jstests/libs/feature_compatibility_version.js'); const adminDB = db.getSiblingDB("admin"); const isMasterCommand = { diff --git a/jstests/replsets/initial_sync_fcv.js b/jstests/replsets/initial_sync_fcv.js index f805f602f06..01c2744949a 100644 --- a/jstests/replsets/initial_sync_fcv.js +++ b/jstests/replsets/initial_sync_fcv.js @@ -7,7 +7,6 @@ (function() { 'use strict'; -load("jstests/libs/feature_compatibility_version.js"); load('jstests/libs/check_log.js'); const rst = new ReplSetTest({nodes: 2}); diff --git a/jstests/replsets/noop_writes_wait_for_write_concern_fcv.js b/jstests/replsets/noop_writes_wait_for_write_concern_fcv.js index 4c295b38b73..b8fe9ae8585 100644 --- a/jstests/replsets/noop_writes_wait_for_write_concern_fcv.js +++ b/jstests/replsets/noop_writes_wait_for_write_concern_fcv.js @@ -4,9 +4,8 @@ (function() { "use strict"; -load("jstests/libs/write_concern_util.js"); // assertWriteConcernError -load("jstests/replsets/rslib.js"); // reconfig -load("jstests/libs/feature_compatibility_version.js"); // latestFCV/lastStableFCV +load("jstests/libs/write_concern_util.js"); // assertWriteConcernError +load("jstests/replsets/rslib.js"); // reconfig // Start a two node replica set and set its FCV to the given version, then take down one // node so majority write concern can no longer be satisfied and verify that a noop setFCV diff --git a/jstests/replsets/retryable_write_concern.js b/jstests/replsets/retryable_write_concern.js index 376d966f193..1d191e6a044 100644 --- a/jstests/replsets/retryable_write_concern.js +++ b/jstests/replsets/retryable_write_concern.js @@ -9,7 +9,6 @@ load("jstests/libs/retryable_writes_util.js"); load("jstests/libs/write_concern_util.js"); -load("jstests/libs/feature_compatibility_version.js"); if (!RetryableWritesUtil.storageEngineSupportsRetryableWrites(jsTest.options().storageEngine)) { jsTestLog("Retryable writes are not supported, skipping test"); diff --git a/jstests/replsets/startup_without_fcv_document_succeeds_if_initial_sync_flag_set.js b/jstests/replsets/startup_without_fcv_document_succeeds_if_initial_sync_flag_set.js index 3b83bda0888..5687a396db6 100644 --- a/jstests/replsets/startup_without_fcv_document_succeeds_if_initial_sync_flag_set.js +++ b/jstests/replsets/startup_without_fcv_document_succeeds_if_initial_sync_flag_set.js @@ -5,7 +5,6 @@ (function() { load("jstests/libs/check_log.js"); -load("jstests/libs/feature_compatibility_version.js"); rst = new ReplSetTest({nodes: 1}); rst.startSet(); diff --git a/jstests/replsets/uninitialized_fcv_access.js b/jstests/replsets/uninitialized_fcv_access.js index dd2ff681e4c..2029e6f54a0 100644 --- a/jstests/replsets/uninitialized_fcv_access.js +++ b/jstests/replsets/uninitialized_fcv_access.js @@ -4,7 +4,6 @@ */ (function() { 'use strict'; -load('jstests/libs/feature_compatibility_version.js'); let rst = new ReplSetTest({nodes: 2}); rst.startSet(); diff --git a/jstests/sharding/autodiscover_config_rs_from_secondary.js b/jstests/sharding/autodiscover_config_rs_from_secondary.js index b9e87eeae06..2a8c3cd6c36 100644 --- a/jstests/sharding/autodiscover_config_rs_from_secondary.js +++ b/jstests/sharding/autodiscover_config_rs_from_secondary.js @@ -1,8 +1,6 @@ // Tests that mongos can autodiscover a config server replica set when the only node it knows about // is not the primary. -load('jstests/libs/feature_compatibility_version.js'); - (function() { 'use strict'; diff --git a/jstests/sharding/autosplit_include.js b/jstests/sharding/autosplit_include.js index 8ddf6a2e459..1247a39385c 100644 --- a/jstests/sharding/autosplit_include.js +++ b/jstests/sharding/autosplit_include.js @@ -1,4 +1,3 @@ -load("jstests/libs/feature_compatibility_version.js"); /** * Waits for all ongoing chunk splits, but only if FCV is latest */ diff --git a/jstests/sharding/config_rs_change.js b/jstests/sharding/config_rs_change.js index 9291c45976e..80bb1caa4c9 100644 --- a/jstests/sharding/config_rs_change.js +++ b/jstests/sharding/config_rs_change.js @@ -2,7 +2,6 @@ // match the replset config on the config servers, and that it can successfully update it's view // of the config replset config during startup. -load("jstests/libs/feature_compatibility_version.js"); var configRS = new ReplSetTest({name: "configRS", nodes: 1, useHostName: true}); configRS.startSet({configsvr: '', journal: "", storageEngine: 'wiredTiger'}); var replConfig = configRS.getReplSetConfig(); diff --git a/jstests/sharding/convert_to_and_from_sharded.js b/jstests/sharding/convert_to_and_from_sharded.js index 9076e803331..8a347f752f0 100644 --- a/jstests/sharding/convert_to_and_from_sharded.js +++ b/jstests/sharding/convert_to_and_from_sharded.js @@ -6,8 +6,6 @@ (function() { "use strict"; -load("jstests/libs/feature_compatibility_version.js"); - var NUM_NODES = 3; /** diff --git a/jstests/sharding/initial_split_validate_shard_collections.js b/jstests/sharding/initial_split_validate_shard_collections.js index 537b03a8783..22c81bdc276 100644 --- a/jstests/sharding/initial_split_validate_shard_collections.js +++ b/jstests/sharding/initial_split_validate_shard_collections.js @@ -3,7 +3,6 @@ * which spreads the collection across all available shards. */ -load("jstests/libs/feature_compatibility_version.js"); load("jstests/libs/uuid_util.js"); (function() { diff --git a/jstests/sharding/max_time_ms_sharded_new_commands.js b/jstests/sharding/max_time_ms_sharded_new_commands.js index b611199954e..977650ef6de 100644 --- a/jstests/sharding/max_time_ms_sharded_new_commands.js +++ b/jstests/sharding/max_time_ms_sharded_new_commands.js @@ -1,7 +1,7 @@ // Make sure the setFeatureCompatibilityVersion command respects maxTimeMs. (function() { 'use strict'; -load("./jstests/libs/feature_compatibility_version.js"); + var st = new ShardingTest({shards: 2}); var mongos = st.s0; diff --git a/jstests/sharding/mongos_wait_csrs_initiate.js b/jstests/sharding/mongos_wait_csrs_initiate.js index 315d87eadc4..96da5a9699c 100644 --- a/jstests/sharding/mongos_wait_csrs_initiate.js +++ b/jstests/sharding/mongos_wait_csrs_initiate.js @@ -1,7 +1,5 @@ // Tests that mongos will wait for CSRS replica set to initiate. -load("jstests/libs/feature_compatibility_version.js"); - var configRS = new ReplSetTest({name: "configRS", nodes: 1, useHostName: true}); configRS.startSet({configsvr: '', journal: "", storageEngine: 'wiredTiger'}); var replConfig = configRS.getReplSetConfig(); diff --git a/src/mongo/shell/SConscript b/src/mongo/shell/SConscript index 255725182aa..bcd76ed9868 100644 --- a/src/mongo/shell/SConscript +++ b/src/mongo/shell/SConscript @@ -66,6 +66,7 @@ env.JSHeader( "data_consistency_checker.js", "bridge.js", "keyvault.js", + "feature_compatibility_version.js", ], ) diff --git a/jstests/libs/feature_compatibility_version.js b/src/mongo/shell/feature_compatibility_version.js index 0894a2a0fd2..0894a2a0fd2 100644 --- a/jstests/libs/feature_compatibility_version.js +++ b/src/mongo/shell/feature_compatibility_version.js diff --git a/src/mongo/shell/replsettest.js b/src/mongo/shell/replsettest.js index 446c72d4c30..0f45e843569 100644 --- a/src/mongo/shell/replsettest.js +++ b/src/mongo/shell/replsettest.js @@ -68,8 +68,6 @@ * nodes {Array.<Mongo>} - connection to replica set members */ -load("jstests/libs/feature_compatibility_version.js"); - var ReplSetTest = function(opts) { 'use strict'; diff --git a/src/mongo/shell/shell_utils.cpp b/src/mongo/shell/shell_utils.cpp index 7c3562b2b7a..9fc6818866a 100644 --- a/src/mongo/shell/shell_utils.cpp +++ b/src/mongo/shell/shell_utils.cpp @@ -123,6 +123,7 @@ extern const JSFile servers_misc; extern const JSFile replsettest; extern const JSFile data_consistency_checker; extern const JSFile bridge; +extern const JSFile feature_compatibility_version; } // namespace JSFiles MONGO_REGISTER_SHIM(BenchRunConfig::createConnectionImpl) @@ -519,6 +520,7 @@ void initScope(Scope& scope) { scope.execSetup(JSFiles::replsettest); scope.execSetup(JSFiles::data_consistency_checker); scope.execSetup(JSFiles::bridge); + scope.execSetup(JSFiles::feature_compatibility_version); initializeEnterpriseScope(scope); |