0
0
mirror of https://github.com/mongodb/mongo.git synced 2024-11-21 20:49:10 +01:00

SERVER-79735 Convert jstest corpus to use es modules

This commit is contained in:
Matt Broadstone 2023-07-06 22:43:46 +00:00 committed by Evergreen Agent
parent cbb3da8712
commit a4f458fe4d
4654 changed files with 12334 additions and 24602 deletions

View File

@ -6,40 +6,220 @@ parserOptions:
ecmaVersion: 2022
sourceType: "module"
extends: "eslint:recommended"
rules:
# Rules are documented at http://eslint.org/docs/rules/
no-cond-assign: 2
no-console: 2
no-control-regex: 2
no-debugger: 2
no-div-regex: 2
no-dupe-args: 2
no-dupe-keys: 2
no-duplicate-case: 2
no-empty-character-class: 2
no-empty-pattern: 2
no-ex-assign: 2
no-extra-boolean-cast: 2
no-extra-semi: 2
no-fallthrough: 2
no-func-assign: 2
no-invalid-regexp: 2
no-labels: 2
no-negated-in-lhs: 2
no-obj-calls: 2
no-octal-escape: 2
no-octal: 2
no-regex-spaces: 2
no-return-assign: 2
no-script-url: 2
no-self-compare: 2
no-sequences: 2
no-sparse-arrays: 2
no-unexpected-multiline: 2
no-unreachable: 2
no-unused-expressions: 2
no-useless-call: 2
no-with: 2
semi: 2
use-isnan: 2
valid-typeof: 2
no-prototype-builtins: 0
no-useless-escape: 0
no-irregular-whitespace: 0
no-inner-declarations: 0
no-unused-vars: [0, { "varsIgnorePattern": "^_", "args": "none" }]
no-empty: 0
no-redeclare: 0
no-constant-condition: 0
no-loss-of-precision: 0
globals:
TestData: true
# TODO(mbroadst): Remove the next line when ReplSetTest and ShardingTest are converted to modules.
Thread: true
ReplSetTest: true
ShardingTest: true
WriteError: true
WriteCommandError: true
BulkWriteError: true
DB: true
DBCollection: true
DBQuery: true
DBExplainQuery: true
DBCommandCursor: true
MongoBridge: true
MongoURI: true
WriteConcern: true
SessionOptions: true
CollInfos: true
CountDownLatch: true
# FCV-related
latestFCV: true
lastLTSFCV: true
lastContinuousFCV: true
checkFCV: true
isFCVEqual: true
binVersionToFCV: true
numVersionsSinceLastLTS: true
getFCVConstants: true
removeFCVDocument: true
targetFCV: true
assert: true
doassert: true
authutil: true
tojson: true
tojsononeline: true
tostrictjson: true
tojsonObject: true
print: true
printjson: true
printjsononeline: true
jsTest: true
jsTestLog: true
jsonTestLog: true
ErrorCodes: true
ErrorCodeStrings: true
checkProgram: true
Random: true
checkLog: true
sleep: true
resetDbpath: true
copyDbpath: true
jsTestName: true
startParallelShell: true
buildInfo: true
getBuildInfo: true
jsTestOptions: true
printShardingStatus: true
_getErrorWithCode: true
isNetworkError: true
__magicNoPrint: true
computeSHA256Block: true
emit: true
_awaitRSHostViaRSMonitor: true
convertShardKeyToHashed: true
benchRun: true
benchRunSync: true
gc: true
DataConsistencyChecker: true
isNumber: true
isObject: true
isString: true
_createSecurityToken: true
_isAddressSanitizerActive: true
allocatePort: true
allocatePorts: true
resetAllocatedPorts: true
bsonObjToArray: true
_writeTestPipeObjects: true
_writeTestPipe: true
_writeTestPipeBsonFile: true
_readTestPipes: true
runFeatureFlagMultiversionTest: true
isRetryableError: true
numberDecimalsAlmostEqual: true
numberDecimalsEqual: true
debug: true
bsonsize: true
globalAssertLevel: true
_DelegatingDriverSession: true
_DummyDriverSession: true
_ServerSession: true
sortDoc: true
executeNoThrowNetworkError: true
_readDumpFile: true
_openGoldenData: true
_writeGoldenData: true
_threadInject: true
port: true
_buildBsonObj: true
convertTrafficRecordingToBSON: true
_setShellFailPoint: true
shellHelper: true
_srand: true
_shouldUseImplicitSessions: true
testingReplication: true
myPort: true
retryOnNetworkError: true
getJSHeapLimitMB: true
_getEnv: true
indentStr: true
_forgetReplSet: true
# likely could be replaced with `path`
_copyFileRange: true
copyFile: true
writeFile: true
fileExists: true
pathExists: true
umask: true
getFileMode: true
# likely could be replaced with `child_process`
MongoRunner: true
run: true
runProgram: true
runMongoProgram: true
runNonMongoProgram: true
_runMongoProgram: true
_startMongoProgram: true
startMongoProgram: true
_stopMongoProgram: true
stopMongoProgramByPid: true
clearRawMongoProgramOutput: true
rawMongoProgramOutput: true
waitProgram: true
waitMongoProgram: true
_runningMongoChildProcessIds: true
startMongoProgramNoConnect: true
# shell-specific
shellPrintHelper: true
shellAutocomplete: true
__autocomplete__: true
getActiveCommands: true
defaultPrompt: true
___it___: true
__promptWrapper__: true
passwordPrompt: true
isInteractive: true
# built-in BSON types and helpers
Code: true
MaxKey: true
MinKey: true
HexData: true
DBPointer: true
DBRef: true
BinData: true
NumberLong: true
NumberDecimal: true
Timestamp: true
MD5: true
Geo: true
bsonWoCompare: true
bsonUnorderedFieldsCompare: true
bsonBinaryEqual: true
friendlyEqual: true
timestampCmp: true
decompressBSONColumn: true
hex_md5: true
QueryHelpers: true
chatty: true
DriverSession: true
ToolTest: true
uncheckedParallelShellPidsString: true
_shouldRetryWrites: true
# from_cpp:
__prompt__: true
_replMonitorStats: true
# explainable.js
Explainable: true
# utils.js
_verboseShell: true
__quiet: true
printStackTrace: true
setVerboseShell: true
_barFormat: true
compare: true
compareOn: true
shellPrint: true
_originalPrint: true
disablePrint: true
enablePrint: true
replSetMemberStatePrompt: true
helloStatePrompt: true
_validateMemberIndex: true
help: true

View File

@ -15,10 +15,11 @@ executor:
- ValidateCollections
config:
shell_options:
eval: globalThis.testingReplication = true; load('jstests/libs/override_methods/network_error_and_txn_override.js');
globalThis.db = connect(TestData.connectionString); load("jstests/libs/override_methods/enable_sessions.js");
load("jstests/libs/override_methods/fail_unclean_shutdown_start_parallel_shell.js");
load('jstests/libs/override_methods/txn_passthrough_cmd_massage.js'); load('jstests/libs/override_methods/implicitly_shard_accessed_collections.js');
eval: globalThis.testingReplication = true; await import('jstests/libs/override_methods/network_error_and_txn_override.js');
globalThis.db = connect(TestData.connectionString); await import("jstests/libs/override_methods/enable_sessions.js");
await import("jstests/libs/override_methods/fail_unclean_shutdown_start_parallel_shell.js");
await import('jstests/libs/override_methods/txn_passthrough_cmd_massage.js');
await import('jstests/libs/override_methods/implicitly_shard_accessed_collections.js');
global_vars:
TestData:
logRetryAttempts: true

View File

@ -15,10 +15,11 @@ executor:
- ValidateCollections
config:
shell_options:
eval: globalThis.testingReplication = true; load('jstests/libs/override_methods/network_error_and_txn_override.js');
globalThis.db = connect(TestData.connectionString); load("jstests/libs/override_methods/enable_sessions.js");
load("jstests/libs/override_methods/fail_unclean_shutdown_start_parallel_shell.js");
load('jstests/libs/override_methods/txn_passthrough_cmd_massage.js'); load('jstests/libs/override_methods/implicitly_shard_accessed_collections.js');
eval: globalThis.testingReplication = true; await import('jstests/libs/override_methods/network_error_and_txn_override.js');
globalThis.db = connect(TestData.connectionString); await import("jstests/libs/override_methods/enable_sessions.js");
await import("jstests/libs/override_methods/fail_unclean_shutdown_start_parallel_shell.js");
await import('jstests/libs/override_methods/txn_passthrough_cmd_massage.js');
await import('jstests/libs/override_methods/implicitly_shard_accessed_collections.js');
global_vars:
TestData:
logRetryAttempts: true

View File

@ -14,8 +14,8 @@ executor:
- ValidateCollections
config:
shell_options:
eval: globalThis.testingReplication = true; load('jstests/libs/override_methods/set_read_and_write_concerns.js');
load('jstests/libs/override_methods/enable_causal_consistency_without_read_pref.js');
eval: globalThis.testingReplication = true; await import('jstests/libs/override_methods/set_read_and_write_concerns.js');
await import('jstests/libs/override_methods/enable_causal_consistency_without_read_pref.js');
global_vars:
TestData:
defaultReadConcernLevel: null

View File

@ -14,8 +14,8 @@ executor:
- ValidateCollections
config:
shell_options:
eval: globalThis.testingReplication = true; load('jstests/libs/override_methods/set_read_and_write_concerns.js');
load('jstests/libs/override_methods/enable_causal_consistency_without_read_pref.js');
eval: globalThis.testingReplication = true; await import('jstests/libs/override_methods/set_read_and_write_concerns.js');
await import('jstests/libs/override_methods/enable_causal_consistency_without_read_pref.js');
global_vars:
TestData:
defaultReadConcernLevel: null

View File

@ -14,8 +14,8 @@ executor:
- ValidateCollections
config:
shell_options:
eval: globalThis.testingReplication = true; load('jstests/libs/override_methods/set_read_and_write_concerns.js');
load('jstests/libs/override_methods/enable_causal_consistency_without_read_pref.js');
eval: globalThis.testingReplication = true; await import('jstests/libs/override_methods/set_read_and_write_concerns.js');
await import('jstests/libs/override_methods/enable_causal_consistency_without_read_pref.js');
global_vars:
TestData:
defaultReadConcernLevel: null

View File

@ -14,8 +14,8 @@ executor:
- ValidateCollections
config:
shell_options:
eval: globalThis.testingReplication = true; load('jstests/libs/override_methods/set_read_and_write_concerns.js');
load('jstests/libs/override_methods/enable_causal_consistency_without_read_pref.js');
eval: globalThis.testingReplication = true; await import('jstests/libs/override_methods/set_read_and_write_concerns.js');
await import('jstests/libs/override_methods/enable_causal_consistency_without_read_pref.js');
global_vars:
TestData:
defaultReadConcernLevel: null

View File

@ -14,8 +14,8 @@ executor:
- ValidateCollections
config:
shell_options:
eval: globalThis.testingReplication = true; load('jstests/libs/override_methods/set_read_and_write_concerns.js');
load('jstests/libs/override_methods/enable_causal_consistency_without_read_pref.js');
eval: globalThis.testingReplication = true; await import('jstests/libs/override_methods/set_read_and_write_concerns.js');
await import('jstests/libs/override_methods/enable_causal_consistency_without_read_pref.js');
global_vars:
TestData:
defaultReadConcernLevel: null

View File

@ -14,8 +14,8 @@ executor:
- ValidateCollections
config:
shell_options:
eval: globalThis.testingReplication = true; load('jstests/libs/override_methods/set_read_and_write_concerns.js');
load('jstests/libs/override_methods/enable_causal_consistency_without_read_pref.js');
eval: globalThis.testingReplication = true; await import('jstests/libs/override_methods/set_read_and_write_concerns.js');
await import('jstests/libs/override_methods/enable_causal_consistency_without_read_pref.js');
global_vars:
TestData:
defaultReadConcernLevel: null

View File

@ -13,8 +13,8 @@ executor:
- ValidateCollections
config:
shell_options:
eval: globalThis.testingReplication = true; load('jstests/libs/override_methods/set_read_and_write_concerns.js');
load('jstests/libs/override_methods/enable_causal_consistency_without_read_pref.js');
eval: globalThis.testingReplication = true; await import('jstests/libs/override_methods/set_read_and_write_concerns.js');
await import('jstests/libs/override_methods/enable_causal_consistency_without_read_pref.js');
global_vars:
TestData:
defaultReadConcernLevel: null

View File

@ -16,10 +16,11 @@ executor:
tests: true
config:
shell_options:
eval: globalThis.testingReplication = true; load('jstests/libs/override_methods/network_error_and_txn_override.js');
globalThis.db = connect(TestData.connectionString); load("jstests/libs/override_methods/enable_sessions.js");
load("jstests/libs/override_methods/set_read_and_write_concerns.js"); load("jstests/libs/override_methods/fail_unclean_shutdown_incompatible_commands.js");
load("jstests/libs/override_methods/fail_unclean_shutdown_start_parallel_shell.js");
eval: globalThis.testingReplication = true; await import('jstests/libs/override_methods/network_error_and_txn_override.js');
globalThis.db = connect(TestData.connectionString); await import("jstests/libs/override_methods/enable_sessions.js");
await import("jstests/libs/override_methods/set_read_and_write_concerns.js");
await import("jstests/libs/override_methods/fail_unclean_shutdown_incompatible_commands.js");
await import("jstests/libs/override_methods/fail_unclean_shutdown_start_parallel_shell.js");
global_vars:
TestData:
alwaysInjectTransactionNumber: true

View File

@ -13,8 +13,8 @@ executor:
- ValidateCollections
config:
shell_options:
eval: globalThis.testingReplication = true; load('jstests/libs/override_methods/set_read_and_write_concerns.js');;
load('jstests/libs/override_methods/set_read_preference_secondary.js');
eval: globalThis.testingReplication = true; await import('jstests/libs/override_methods/set_read_and_write_concerns.js');;
await import('jstests/libs/override_methods/set_read_preference_secondary.js');
global_vars:
TestData:
defaultReadConcernLevel: null

View File

@ -16,8 +16,9 @@ executor:
- ValidateCollections
config:
shell_options:
eval: globalThis.testingReplication = true; load('jstests/libs/override_methods/set_read_and_write_concerns.js');;
load('jstests/libs/override_methods/set_read_preference_secondary.js');; load('jstests/libs/override_methods/implicitly_shard_accessed_collections.js');
eval: globalThis.testingReplication = true; await import('jstests/libs/override_methods/set_read_and_write_concerns.js');;
await import('jstests/libs/override_methods/set_read_preference_secondary.js');;
await import('jstests/libs/override_methods/implicitly_shard_accessed_collections.js');
global_vars:
TestData:
defaultReadConcernLevel: null

View File

@ -13,9 +13,9 @@ executor:
- ValidateCollections
config:
shell_options:
eval: globalThis.testingReplication = true; load('jstests/libs/override_methods/set_read_and_write_concerns.js');;
load('jstests/libs/override_methods/implicitly_shard_accessed_collections.js');;
load('jstests/libs/override_methods/enable_causal_consistency_without_read_pref.js');
eval: globalThis.testingReplication = true; await import('jstests/libs/override_methods/set_read_and_write_concerns.js');;
await import('jstests/libs/override_methods/implicitly_shard_accessed_collections.js');;
await import('jstests/libs/override_methods/enable_causal_consistency_without_read_pref.js');
global_vars:
TestData:
defaultReadConcernLevel: null

View File

@ -13,9 +13,9 @@ executor:
- ValidateCollections
config:
shell_options:
eval: globalThis.testingReplication = true; load('jstests/libs/override_methods/set_read_and_write_concerns.js');;
load('jstests/libs/override_methods/implicitly_shard_accessed_collections.js');;
load('jstests/libs/override_methods/enable_causal_consistency_without_read_pref.js');
eval: globalThis.testingReplication = true; await import('jstests/libs/override_methods/set_read_and_write_concerns.js');;
await import('jstests/libs/override_methods/implicitly_shard_accessed_collections.js');;
await import('jstests/libs/override_methods/enable_causal_consistency_without_read_pref.js');
global_vars:
TestData:
defaultReadConcernLevel: null

View File

@ -13,9 +13,9 @@ executor:
- ValidateCollections
config:
shell_options:
eval: globalThis.testingReplication = true; load('jstests/libs/override_methods/set_read_and_write_concerns.js');;
load('jstests/libs/override_methods/implicitly_shard_accessed_collections.js');;
load('jstests/libs/override_methods/enable_causal_consistency_without_read_pref.js');
eval: globalThis.testingReplication = true; await import('jstests/libs/override_methods/set_read_and_write_concerns.js');;
await import('jstests/libs/override_methods/implicitly_shard_accessed_collections.js');;
await import('jstests/libs/override_methods/enable_causal_consistency_without_read_pref.js');
global_vars:
TestData:
defaultReadConcernLevel: null

View File

@ -13,9 +13,9 @@ executor:
- ValidateCollections
config:
shell_options:
eval: globalThis.testingReplication = true; load('jstests/libs/override_methods/set_read_and_write_concerns.js');;
load('jstests/libs/override_methods/implicit_whole_cluster_changestreams.js');;
load('jstests/libs/override_methods/enable_causal_consistency_without_read_pref.js');
eval: globalThis.testingReplication = true; await import('jstests/libs/override_methods/set_read_and_write_concerns.js');;
await import('jstests/libs/override_methods/implicit_whole_cluster_changestreams.js');;
await import('jstests/libs/override_methods/enable_causal_consistency_without_read_pref.js');
global_vars:
TestData:
defaultReadConcernLevel: null

View File

@ -13,8 +13,9 @@ executor:
- ValidateCollections
config:
shell_options:
eval: globalThis.testingReplication = true; load('jstests/libs/override_methods/set_read_and_write_concerns.js');;
load('jstests/libs/override_methods/set_read_preference_secondary.js');; load('jstests/libs/override_methods/implicit_whole_cluster_changestreams.js');
eval: globalThis.testingReplication = true; await import('jstests/libs/override_methods/set_read_and_write_concerns.js');;
await import('jstests/libs/override_methods/set_read_preference_secondary.js');;
await import('jstests/libs/override_methods/implicit_whole_cluster_changestreams.js');
global_vars:
TestData:
defaultReadConcernLevel: null

View File

@ -16,9 +16,10 @@ executor:
- ValidateCollections
config:
shell_options:
eval: globalThis.testingReplication = true; load('jstests/libs/override_methods/set_read_and_write_concerns.js');;
load('jstests/libs/override_methods/set_read_preference_secondary.js');; load('jstests/libs/override_methods/implicitly_shard_accessed_collections.js');;
load('jstests/libs/override_methods/implicit_whole_cluster_changestreams.js');
eval: globalThis.testingReplication = true; await import('jstests/libs/override_methods/set_read_and_write_concerns.js');;
await import('jstests/libs/override_methods/set_read_preference_secondary.js');;
await import('jstests/libs/override_methods/implicitly_shard_accessed_collections.js');;
await import('jstests/libs/override_methods/implicit_whole_cluster_changestreams.js');
global_vars:
TestData:
defaultReadConcernLevel: null

View File

@ -13,10 +13,10 @@ executor:
- ValidateCollections
config:
shell_options:
eval: globalThis.testingReplication = true; load('jstests/libs/override_methods/set_read_and_write_concerns.js');;
load('jstests/libs/override_methods/implicitly_shard_accessed_collections.js');;
load('jstests/libs/override_methods/implicit_whole_cluster_changestreams.js');;
load('jstests/libs/override_methods/enable_causal_consistency_without_read_pref.js');
eval: globalThis.testingReplication = true; await import('jstests/libs/override_methods/set_read_and_write_concerns.js');;
await import('jstests/libs/override_methods/implicitly_shard_accessed_collections.js');;
await import('jstests/libs/override_methods/implicit_whole_cluster_changestreams.js');;
await import('jstests/libs/override_methods/enable_causal_consistency_without_read_pref.js');
global_vars:
TestData:
defaultReadConcernLevel: null

View File

@ -13,9 +13,9 @@ executor:
- ValidateCollections
config:
shell_options:
eval: globalThis.testingReplication = true; load('jstests/libs/override_methods/set_read_and_write_concerns.js');;
load('jstests/libs/override_methods/implicit_whole_db_changestreams.js');;
load('jstests/libs/override_methods/enable_causal_consistency_without_read_pref.js');
eval: globalThis.testingReplication = true; await import('jstests/libs/override_methods/set_read_and_write_concerns.js');;
await import('jstests/libs/override_methods/implicit_whole_db_changestreams.js');;
await import('jstests/libs/override_methods/enable_causal_consistency_without_read_pref.js');
global_vars:
TestData:
defaultReadConcernLevel: null

View File

@ -13,8 +13,9 @@ executor:
- ValidateCollections
config:
shell_options:
eval: globalThis.testingReplication = true; load('jstests/libs/override_methods/set_read_and_write_concerns.js');;
load('jstests/libs/override_methods/set_read_preference_secondary.js');; load('jstests/libs/override_methods/implicit_whole_db_changestreams.js');
eval: globalThis.testingReplication = true; await import('jstests/libs/override_methods/set_read_and_write_concerns.js');;
await import('jstests/libs/override_methods/set_read_preference_secondary.js');;
await import('jstests/libs/override_methods/implicit_whole_db_changestreams.js');
global_vars:
TestData:
defaultReadConcernLevel: null

View File

@ -16,9 +16,10 @@ executor:
- ValidateCollections
config:
shell_options:
eval: globalThis.testingReplication = true; load('jstests/libs/override_methods/set_read_and_write_concerns.js');;
load('jstests/libs/override_methods/set_read_preference_secondary.js');; load('jstests/libs/override_methods/implicitly_shard_accessed_collections.js');;
load('jstests/libs/override_methods/implicit_whole_db_changestreams.js');
eval: globalThis.testingReplication = true; await import('jstests/libs/override_methods/set_read_and_write_concerns.js');;
await import('jstests/libs/override_methods/set_read_preference_secondary.js');;
await import('jstests/libs/override_methods/implicitly_shard_accessed_collections.js');;
await import('jstests/libs/override_methods/implicit_whole_db_changestreams.js');
global_vars:
TestData:
defaultReadConcernLevel: null

View File

@ -13,10 +13,10 @@ executor:
- ValidateCollections
config:
shell_options:
eval: globalThis.testingReplication = true; load('jstests/libs/override_methods/set_read_and_write_concerns.js');;
load('jstests/libs/override_methods/implicitly_shard_accessed_collections.js');;
load('jstests/libs/override_methods/implicit_whole_db_changestreams.js');;
load('jstests/libs/override_methods/enable_causal_consistency_without_read_pref.js');
eval: globalThis.testingReplication = true; await import('jstests/libs/override_methods/set_read_and_write_concerns.js');;
await import('jstests/libs/override_methods/implicitly_shard_accessed_collections.js');;
await import('jstests/libs/override_methods/implicit_whole_db_changestreams.js');;
await import('jstests/libs/override_methods/enable_causal_consistency_without_read_pref.js');
global_vars:
TestData:
defaultReadConcernLevel: null

View File

@ -13,7 +13,7 @@ executor:
config:
shell_options:
crashOnInvalidBSONError: ''
eval: load("jstests/libs/override_methods/detect_spawning_own_mongod.js");
eval: await import("jstests/libs/override_methods/detect_spawning_own_mongod.js");
objcheck: ''
fixture:
class: MongoDFixture

View File

@ -16,8 +16,8 @@ executor:
config:
shell_options:
crashOnInvalidBSONError: ''
eval: load("jstests/libs/override_methods/detect_spawning_own_mongod.js");;
load("jstests/libs/override_methods/rerun_queries.js");; load("jstests/libs/override_methods/find_batch_size.js");
eval: await import("jstests/libs/override_methods/detect_spawning_own_mongod.js");;
await import("jstests/libs/override_methods/rerun_queries.js");; await import("jstests/libs/override_methods/find_batch_size.js");
global_vars:
TestData:
batchSize: 2

View File

@ -13,8 +13,8 @@ executor:
config:
shell_options:
crashOnInvalidBSONError: ''
eval: load("jstests/libs/override_methods/detect_spawning_own_mongod.js");;
load("jstests/libs/override_methods/find_batch_size.js");
eval: await import("jstests/libs/override_methods/detect_spawning_own_mongod.js");;
await import("jstests/libs/override_methods/find_batch_size.js");
global_vars:
TestData:
batchSize: 2

View File

@ -13,8 +13,8 @@ executor:
config:
shell_options:
crashOnInvalidBSONError: ''
eval: load("jstests/libs/override_methods/detect_spawning_own_mongod.js");;
load("jstests/libs/override_methods/rerun_queries.js");
eval: await import("jstests/libs/override_methods/detect_spawning_own_mongod.js");;
await import("jstests/libs/override_methods/rerun_queries.js");
objcheck: ''
fixture:
class: MongoDFixture

View File

@ -15,10 +15,11 @@ executor:
tests: true
config:
shell_options:
eval: globalThis.testingReplication = true; load('jstests/libs/override_methods/network_error_and_txn_override.js');
globalThis.db = connect(TestData.connectionString); load("jstests/libs/override_methods/enable_sessions.js");
load("jstests/libs/override_methods/set_read_and_write_concerns.js"); load("jstests/libs/override_methods/fail_unclean_shutdown_incompatible_commands.js");
load("jstests/libs/override_methods/fail_unclean_shutdown_start_parallel_shell.js");
eval: globalThis.testingReplication = true; await import('jstests/libs/override_methods/network_error_and_txn_override.js');
globalThis.db = connect(TestData.connectionString); await import("jstests/libs/override_methods/enable_sessions.js");
await import("jstests/libs/override_methods/set_read_and_write_concerns.js");
await import("jstests/libs/override_methods/fail_unclean_shutdown_incompatible_commands.js");
await import("jstests/libs/override_methods/fail_unclean_shutdown_start_parallel_shell.js");
global_vars:
TestData:
alwaysInjectTransactionNumber: true

View File

@ -15,10 +15,11 @@ executor:
tests: true
config:
shell_options:
eval: globalThis.testingReplication = true; load('jstests/libs/override_methods/network_error_and_txn_override.js');
globalThis.db = connect(TestData.connectionString); load("jstests/libs/override_methods/enable_sessions.js");
load("jstests/libs/override_methods/set_read_and_write_concerns.js"); load("jstests/libs/override_methods/fail_unclean_shutdown_incompatible_commands.js");
load("jstests/libs/override_methods/fail_unclean_shutdown_start_parallel_shell.js");
eval: globalThis.testingReplication = true; await import('jstests/libs/override_methods/network_error_and_txn_override.js');
globalThis.db = connect(TestData.connectionString); await import("jstests/libs/override_methods/enable_sessions.js");
await import("jstests/libs/override_methods/set_read_and_write_concerns.js");
await import("jstests/libs/override_methods/fail_unclean_shutdown_incompatible_commands.js");
await import("jstests/libs/override_methods/fail_unclean_shutdown_start_parallel_shell.js");
global_vars:
TestData:
alwaysInjectTransactionNumber: true

View File

@ -15,10 +15,11 @@ executor:
tests: true
config:
shell_options:
eval: globalThis.testingReplication = true; load('jstests/libs/override_methods/network_error_and_txn_override.js');
globalThis.db = connect(TestData.connectionString); load("jstests/libs/override_methods/enable_sessions.js");
load("jstests/libs/override_methods/set_read_and_write_concerns.js"); load("jstests/libs/override_methods/fail_unclean_shutdown_incompatible_commands.js");
load("jstests/libs/override_methods/fail_unclean_shutdown_start_parallel_shell.js");
eval: globalThis.testingReplication = true; await import('jstests/libs/override_methods/network_error_and_txn_override.js');
globalThis.db = connect(TestData.connectionString); await import("jstests/libs/override_methods/enable_sessions.js");
await import("jstests/libs/override_methods/set_read_and_write_concerns.js");
await import("jstests/libs/override_methods/fail_unclean_shutdown_incompatible_commands.js");
await import("jstests/libs/override_methods/fail_unclean_shutdown_start_parallel_shell.js");
global_vars:
TestData:
alwaysInjectTransactionNumber: true

View File

@ -15,10 +15,11 @@ executor:
tests: true
config:
shell_options:
eval: globalThis.testingReplication = true; load('jstests/libs/override_methods/network_error_and_txn_override.js');
globalThis.db = connect(TestData.connectionString); load("jstests/libs/override_methods/enable_sessions.js");
load("jstests/libs/override_methods/set_read_and_write_concerns.js"); load("jstests/libs/override_methods/fail_unclean_shutdown_incompatible_commands.js");
load("jstests/libs/override_methods/fail_unclean_shutdown_start_parallel_shell.js");
eval: globalThis.testingReplication = true; await import('jstests/libs/override_methods/network_error_and_txn_override.js');
globalThis.db = connect(TestData.connectionString); await import("jstests/libs/override_methods/enable_sessions.js");
await import("jstests/libs/override_methods/set_read_and_write_concerns.js");
await import("jstests/libs/override_methods/fail_unclean_shutdown_incompatible_commands.js");
await import("jstests/libs/override_methods/fail_unclean_shutdown_start_parallel_shell.js");
global_vars:
TestData:
alwaysInjectTransactionNumber: true

View File

@ -14,7 +14,7 @@ executor:
- ValidateCollections
config:
shell_options:
eval: load("jstests/libs/override_methods/implicitly_shard_accessed_collections.js")
eval: await import("jstests/libs/override_methods/implicitly_shard_accessed_collections.js");
fixture:
class: ShardedClusterFixture
enable_balancer: false

View File

@ -14,7 +14,7 @@ executor:
- ValidateCollections
config:
shell_options:
eval: load("jstests/libs/override_methods/implicitly_shard_accessed_collections.js")
eval: await import("jstests/libs/override_methods/implicitly_shard_accessed_collections.js");
fixture:
class: ShardedClusterFixture
enable_balancer: false

View File

@ -16,10 +16,11 @@ executor:
tests: true
config:
shell_options:
eval: globalThis.testingReplication = true; load('jstests/libs/override_methods/network_error_and_txn_override.js');
globalThis.db = connect(TestData.connectionString); load("jstests/libs/override_methods/enable_sessions.js");
load("jstests/libs/override_methods/set_read_and_write_concerns.js"); load("jstests/libs/override_methods/fail_unclean_shutdown_incompatible_commands.js");
load("jstests/libs/override_methods/fail_unclean_shutdown_start_parallel_shell.js");
eval: globalThis.testingReplication = true; await import('jstests/libs/override_methods/network_error_and_txn_override.js');
globalThis.db = connect(TestData.connectionString); await import("jstests/libs/override_methods/enable_sessions.js");
await import("jstests/libs/override_methods/set_read_and_write_concerns.js");
await import("jstests/libs/override_methods/fail_unclean_shutdown_incompatible_commands.js");
await import("jstests/libs/override_methods/fail_unclean_shutdown_start_parallel_shell.js");
global_vars:
TestData:
alwaysInjectTransactionNumber: true

View File

@ -16,10 +16,11 @@ executor:
tests: true
config:
shell_options:
eval: globalThis.testingReplication = true; load('jstests/libs/override_methods/network_error_and_txn_override.js');
globalThis.db = connect(TestData.connectionString); load("jstests/libs/override_methods/enable_sessions.js");
load("jstests/libs/override_methods/set_read_and_write_concerns.js"); load("jstests/libs/override_methods/fail_unclean_shutdown_incompatible_commands.js");
load("jstests/libs/override_methods/fail_unclean_shutdown_start_parallel_shell.js");
eval: globalThis.testingReplication = true; await import('jstests/libs/override_methods/network_error_and_txn_override.js');
globalThis.db = connect(TestData.connectionString); await import("jstests/libs/override_methods/enable_sessions.js");
await import("jstests/libs/override_methods/set_read_and_write_concerns.js");
await import("jstests/libs/override_methods/fail_unclean_shutdown_incompatible_commands.js");
await import("jstests/libs/override_methods/fail_unclean_shutdown_start_parallel_shell.js");
global_vars:
TestData:
alwaysInjectTransactionNumber: true

View File

@ -8,11 +8,11 @@
# the ones we always want
eval: >-
globalThis.testingReplication = true;
load('jstests/libs/override_methods/set_read_and_write_concerns.js');
await import('jstests/libs/override_methods/set_read_and_write_concerns.js');
- name: causal_consistency
value:
eval: load('jstests/libs/override_methods/enable_causal_consistency_without_read_pref.js');
eval: await import('jstests/libs/override_methods/enable_causal_consistency_without_read_pref.js');
- name: base_eval
value:
@ -23,7 +23,7 @@
# to get rid of causal consistency
eval: >-
globalThis.testingReplication = true;
load('jstests/libs/override_methods/set_read_and_write_concerns.js');
await import('jstests/libs/override_methods/set_read_and_write_concerns.js');
- name: mongos_passthrough
value:
@ -75,7 +75,7 @@
- name: sharded_collections_passthrough_eval
value:
eval: "load('jstests/libs/override_methods/implicitly_shard_accessed_collections.js');"
eval: "await import('jstests/libs/override_methods/implicitly_shard_accessed_collections.js');"
- name: secondary_reads
value:
@ -117,7 +117,7 @@
- name: secondary_reads_eval
value:
eval: load('jstests/libs/override_methods/set_read_preference_secondary.js');
eval: await import('jstests/libs/override_methods/set_read_preference_secondary.js');
- name: disable_write_noops
value:
@ -130,8 +130,8 @@
- name: whole_db_eval
value:
eval: "load('jstests/libs/override_methods/implicit_whole_db_changestreams.js');"
eval: "await import('jstests/libs/override_methods/implicit_whole_db_changestreams.js');"
- name: whole_cluster_eval
value:
eval: "load('jstests/libs/override_methods/implicit_whole_cluster_changestreams.js');"
eval: "await import('jstests/libs/override_methods/implicit_whole_cluster_changestreams.js');"

View File

@ -10,12 +10,12 @@
shell_options:
eval: >-
globalThis.testingReplication = true;
load('jstests/libs/override_methods/network_error_and_txn_override.js');
await import('jstests/libs/override_methods/network_error_and_txn_override.js');
globalThis.db = connect(TestData.connectionString);
load("jstests/libs/override_methods/enable_sessions.js");
load("jstests/libs/override_methods/set_read_and_write_concerns.js");
load("jstests/libs/override_methods/fail_unclean_shutdown_incompatible_commands.js");
load("jstests/libs/override_methods/fail_unclean_shutdown_start_parallel_shell.js");
await import("jstests/libs/override_methods/enable_sessions.js");
await import("jstests/libs/override_methods/set_read_and_write_concerns.js");
await import("jstests/libs/override_methods/fail_unclean_shutdown_incompatible_commands.js");
await import("jstests/libs/override_methods/fail_unclean_shutdown_start_parallel_shell.js");
global_vars:
TestData:
alwaysInjectTransactionNumber: true

View File

@ -12,7 +12,7 @@
- name: enable_eval
value:
eval: load("jstests/libs/override_methods/find_batch_size.js");
eval: await import("jstests/libs/override_methods/find_batch_size.js");
- name: excluded_files
value:

View File

@ -3,7 +3,7 @@
# cache -- do not affect correctness.
- name: enable_eval
value:
eval: load("jstests/libs/override_methods/rerun_queries.js");
eval: await import("jstests/libs/override_methods/rerun_queries.js");
- name: excluded_files
value:

View File

@ -13,7 +13,7 @@ executor:
- ValidateCollections
config:
shell_options:
eval: load("jstests/libs/override_methods/detect_spawning_own_mongod.js");
eval: await import("jstests/libs/override_methods/detect_spawning_own_mongod.js");
hooks:
- class: ValidateCollections
- class: CleanEveryN

View File

@ -25,7 +25,7 @@ executor:
# This override method helps some tests remain applicable in the passthrough by hiding the
# column store indexes from 'listIndexes' output, so tests can still see only a list of
# indexes that the test itself created.
eval: load("jstests/libs/override_methods/hide_column_store_indexes_from_get_indexes.js")
eval: await import("jstests/libs/override_methods/hide_column_store_indexes_from_get_indexes.js")
hooks:
- class: ValidateCollections
- class: CleanEveryN

View File

@ -15,7 +15,7 @@ executor:
- ValidateCollections
config:
shell_options:
eval: load("jstests/libs/override_methods/implicitly_wrap_pipelines_in_facets.js");
eval: await import("jstests/libs/override_methods/implicitly_wrap_pipelines_in_facets.js");
hooks:
- class: ValidateCollections
- class: CleanEveryN

View File

@ -31,7 +31,7 @@ executor:
shell_options:
# Use an override to error if a test starts its own test fixture since such a test should not
# be part of this passthrough.
eval: load("jstests/libs/override_methods/detect_spawning_own_mongod.js");
eval: await import("jstests/libs/override_methods/detect_spawning_own_mongod.js");
hooks:
- class: CheckReplDBHash
- class: CheckMetadataConsistencyInBackground

View File

@ -32,8 +32,8 @@ executor:
# Use the overrides to implicitly shard all accessed collections, and to error if a test
# starts its own test fixture - since such a test should not be part of this passthrough.
eval: >-
load("jstests/libs/override_methods/implicitly_shard_accessed_collections.js");
load("jstests/libs/override_methods/detect_spawning_own_mongod.js");
await import("jstests/libs/override_methods/implicitly_shard_accessed_collections.js");
await import("jstests/libs/override_methods/detect_spawning_own_mongod.js");
hooks:
- class: CheckReplDBHash
- class: CheckMetadataConsistencyInBackground

View File

@ -38,7 +38,7 @@ executor:
enableMajorityReadConcern: ''
eval: >-
globalThis.testingReplication = true;
load('jstests/libs/override_methods/set_read_and_write_concerns.js');
await import('jstests/libs/override_methods/set_read_and_write_concerns.js');
hooks:
# The CheckReplDBHash hook waits until all operations have replicated to and have been applied
# on the secondaries, so we run the ValidateCollections hook after it to ensure we're

View File

@ -24,8 +24,8 @@ executor:
config:
shell_options:
eval: >-
load("jstests/libs/override_methods/detect_spawning_own_mongod.js");
load("jstests/libs/override_methods/rerun_queries.js");
await import("jstests/libs/override_methods/detect_spawning_own_mongod.js");
await import("jstests/libs/override_methods/rerun_queries.js");
hooks:
- class: ValidateCollections
- class: CleanEveryN

View File

@ -45,8 +45,8 @@ executor:
shell_options:
eval: >-
globalThis.testingReplication = true;
load('jstests/libs/override_methods/enable_causal_consistency.js');
load('jstests/libs/override_methods/detect_spawning_own_mongod.js');
await import('jstests/libs/override_methods/enable_causal_consistency.js');
await import('jstests/libs/override_methods/detect_spawning_own_mongod.js');
hooks:
# The CheckReplDBHash hook waits until all operations have replicated to and have been applied
# on the secondaries, so we run the ValidateCollections hook after it to ensure we're

View File

@ -59,9 +59,9 @@ executor:
shell_options:
eval: >-
globalThis.testingReplication = true;
load('jstests/libs/override_methods/enable_causal_consistency.js');
load('jstests/libs/override_methods/detect_spawning_own_mongod.js');
load("jstests/libs/override_methods/implicitly_shard_accessed_collections.js")
await import('jstests/libs/override_methods/enable_causal_consistency.js');
await import('jstests/libs/override_methods/detect_spawning_own_mongod.js');
await import("jstests/libs/override_methods/implicitly_shard_accessed_collections.js")
hooks:
# The CheckReplDBHash hook waits until all operations have replicated to and have been applied
# on the secondaries, so we run the ValidateCollections hook after it to ensure we're

View File

@ -35,7 +35,7 @@ executor:
- ValidateCollections
config:
shell_options:
eval: load("jstests/libs/override_methods/implicitly_shard_accessed_collections.js")
eval: await import("jstests/libs/override_methods/implicitly_shard_accessed_collections.js")
hooks:
- class: CheckReplDBHash
- class: CheckMetadataConsistencyInBackground

View File

@ -138,7 +138,7 @@ executor:
config:
shell_options:
eval: >-
load("jstests/libs/override_methods/implicitly_configure_query_analyzer.js");
await import("jstests/libs/override_methods/implicitly_configure_query_analyzer.js");
hooks:
- class: AnalyzeShardKeysInBackground
- class: CheckReplOplogs

View File

@ -67,8 +67,8 @@ executor:
config:
shell_options:
eval: >-
load("jstests/libs/override_methods/enable_causal_consistency_without_read_pref.js");
load('jstests/libs/override_methods/enable_hedged_reads.js');
await import("jstests/libs/override_methods/enable_causal_consistency_without_read_pref.js");
await import('jstests/libs/override_methods/enable_hedged_reads.js');
hooks:
- class: CheckReplDBHash
- class: CheckMetadataConsistencyInBackground

View File

@ -69,7 +69,7 @@ executor:
- ValidateCollections
config:
shell_options:
eval: load("jstests/libs/override_methods/enable_causal_consistency.js")
eval: await import("jstests/libs/override_methods/enable_causal_consistency.js")
hooks:
- class: CheckReplDBHash
- class: CheckMetadataConsistencyInBackground

View File

@ -136,7 +136,7 @@ executor:
db.getSiblingDB(jsTest.options().authenticationDatabase).logout();
db.auth(username, password);
})();
load("jstests/libs/override_methods/enable_causal_consistency.js");
await import("jstests/libs/override_methods/enable_causal_consistency.js");
<<: *authOptions
hooks:
- class: CheckReplDBHash

View File

@ -29,7 +29,7 @@ executor:
shell_options:
eval: >-
globalThis.testingReplication = true;
load('jstests/libs/override_methods/enable_causal_consistency_without_read_pref.js');
await import('jstests/libs/override_methods/enable_causal_consistency_without_read_pref.js');
hooks:
# We don't execute dbHash or oplog consistency checks since there is only a single replica set
# node.

View File

@ -42,8 +42,8 @@ executor:
defaultReadConcernLevel: snapshot
eval: >-
globalThis.testingReplication = true;
load('jstests/libs/override_methods/set_read_and_write_concerns.js');
load("jstests/libs/override_methods/enable_causal_consistency.js");
await import('jstests/libs/override_methods/set_read_and_write_concerns.js');
await import("jstests/libs/override_methods/enable_causal_consistency.js");
hooks:
# The CheckReplDBHash hook waits until all operations have replicated to and have been applied
# on the secondaries, so we run the ValidateCollections hook after it to ensure we're

View File

@ -35,8 +35,8 @@ executor:
# point to advance to the timestamp of the last write before doing a new read.
eval: >-
globalThis.testingReplication = true;
load('jstests/libs/override_methods/set_read_and_write_concerns.js');
load('jstests/libs/override_methods/enable_causal_consistency_without_read_pref.js');
await import('jstests/libs/override_methods/set_read_and_write_concerns.js');
await import('jstests/libs/override_methods/enable_causal_consistency_without_read_pref.js');
hooks:
# The CheckReplDBHash hook waits until all operations have replicated to and have been applied
# on the secondaries, so we run the ValidateCollections hook after it to ensure we're

View File

@ -363,12 +363,12 @@ executor:
# uses_parallel_shell tags to denylist tests that uses them unsafely.
eval: >-
globalThis.testingReplication = true;
load('jstests/libs/override_methods/network_error_and_txn_override.js');
await import('jstests/libs/override_methods/network_error_and_txn_override.js');
globalThis.db = connect(TestData.connectionString);
load("jstests/libs/override_methods/enable_sessions.js");
load("jstests/libs/override_methods/fail_unclean_shutdown_start_parallel_shell.js");
load('jstests/libs/override_methods/txn_passthrough_cmd_massage.js');
load('jstests/libs/override_methods/implicitly_shard_accessed_collections.js');
await import("jstests/libs/override_methods/enable_sessions.js");
await import("jstests/libs/override_methods/fail_unclean_shutdown_start_parallel_shell.js");
await import('jstests/libs/override_methods/txn_passthrough_cmd_massage.js');
await import('jstests/libs/override_methods/implicitly_shard_accessed_collections.js');
global_vars:
TestData:
logRetryAttempts: true

View File

@ -37,9 +37,9 @@ executor:
# change_streams.yml for detailed explanation.
eval: >-
globalThis.testingReplication = true;
load('jstests/libs/override_methods/set_read_and_write_concerns.js');
load('jstests/libs/override_methods/enable_sessions.js');
load('jstests/libs/override_methods/enable_causal_consistency_without_read_pref.js');
await import('jstests/libs/override_methods/set_read_and_write_concerns.js');
await import('jstests/libs/override_methods/enable_sessions.js');
await import('jstests/libs/override_methods/enable_causal_consistency_without_read_pref.js');
hooks:
- class: CheckReplDBHash
- class: CheckMetadataConsistencyInBackground

View File

@ -34,10 +34,10 @@ executor:
# Enable the transactions passthrough.
eval: >-
globalThis.testingReplication = true;
load('jstests/libs/override_methods/enable_sessions.js');
load('jstests/libs/override_methods/txn_passthrough_cmd_massage.js');
load('jstests/libs/override_methods/network_error_and_txn_override.js');
load('jstests/libs/override_methods/implicit_filter_eot_changestreams.js');
await import("jstests/libs/override_methods/enable_sessions.js");
await import("jstests/libs/override_methods/txn_passthrough_cmd_massage.js");
await import("jstests/libs/override_methods/network_error_and_txn_override.js");
await import("jstests/libs/override_methods/implicit_filter_eot_changestreams.js");
hooks:
# The CheckReplDBHash hook waits until all operations have replicated to and have been applied
# on the secondaries, so we run the ValidateCollections hook after it to ensure we're

View File

@ -31,10 +31,10 @@ executor:
# Enable the transactions passthrough.
eval: >-
globalThis.testingReplication = true;
load('jstests/libs/override_methods/enable_sessions.js');
load('jstests/libs/override_methods/txn_passthrough_cmd_massage.js');
load('jstests/libs/override_methods/network_error_and_txn_override.js');
load('jstests/libs/override_methods/implicit_filter_eot_changestreams.js');
await import("jstests/libs/override_methods/enable_sessions.js");
await import("jstests/libs/override_methods/txn_passthrough_cmd_massage.js");
await import("jstests/libs/override_methods/network_error_and_txn_override.js");
await import("jstests/libs/override_methods/implicit_filter_eot_changestreams.js");
hooks:
# The CheckReplDBHash hook waits until all operations have replicated to and have been applied
# on the secondaries, so we run the ValidateCollections hook after it to ensure we're

View File

@ -35,10 +35,10 @@ executor:
# Enable the transactions passthrough.
eval: >-
globalThis.testingReplication = true;
load('jstests/libs/override_methods/enable_sessions.js');
load('jstests/libs/override_methods/txn_passthrough_cmd_massage.js');
load('jstests/libs/override_methods/network_error_and_txn_override.js');
load('jstests/libs/override_methods/implicit_filter_eot_changestreams.js');
await import("jstests/libs/override_methods/enable_sessions.js");
await import("jstests/libs/override_methods/txn_passthrough_cmd_massage.js");
await import("jstests/libs/override_methods/network_error_and_txn_override.js");
await import("jstests/libs/override_methods/implicit_filter_eot_changestreams.js");
hooks:
# The CheckReplDBHash hook waits until all operations have replicated to and have been applied
# on the secondaries, so we run the ValidateCollections hook after it to ensure we're

View File

@ -75,9 +75,9 @@ executor:
# change_streams.yml for detailed explanation.
eval: >-
globalThis.testingReplication = true;
load('jstests/libs/override_methods/set_read_and_write_concerns.js');
load('jstests/libs/override_methods/enable_causal_consistency_without_read_pref.js');
load('jstests/libs/override_methods/inject_dollar_tenant.js');
await import('jstests/libs/override_methods/set_read_and_write_concerns.js');
await import('jstests/libs/override_methods/enable_causal_consistency_without_read_pref.js');
await import('jstests/libs/override_methods/inject_dollar_tenant.js');
hooks:
# The CheckReplDBHash hook waits until all operations have replicated to and have been applied
# on the secondaries, so we run the ValidateCollections hook after it to ensure we're

View File

@ -45,10 +45,10 @@ executor:
# change_streams.yml for detailed explanation.
eval: >-
globalThis.testingReplication = true;
load('jstests/libs/override_methods/set_read_and_write_concerns.js');
load('jstests/libs/override_methods/enable_causal_consistency_without_read_pref.js');
load('jstests/libs/override_methods/implicitly_shard_accessed_collections.js');
load('jstests/libs/override_methods/override_fixtures_changestream_multitenancy.js');
await import('jstests/libs/override_methods/set_read_and_write_concerns.js');
await import('jstests/libs/override_methods/enable_causal_consistency_without_read_pref.js');
await import('jstests/libs/override_methods/implicitly_shard_accessed_collections.js');
await import('jstests/libs/override_methods/override_fixtures_changestream_multitenancy.js');
hooks:
- class: EnableChangeStream
- class: CheckReplDBHash

View File

@ -35,10 +35,10 @@ executor:
# change_streams.yml for detailed explanation.
eval: >-
globalThis.testingReplication = true;
load('jstests/libs/override_methods/set_read_and_write_concerns.js');
load('jstests/libs/override_methods/implicitly_shard_accessed_collections.js');
load('jstests/libs/override_methods/enable_causal_consistency_without_read_pref.js');
load('jstests/libs/override_methods/implicit_passthrough_to_shard_changestreams.js');
await import('jstests/libs/override_methods/set_read_and_write_concerns.js');
await import('jstests/libs/override_methods/implicitly_shard_accessed_collections.js');
await import('jstests/libs/override_methods/enable_causal_consistency_without_read_pref.js');
await import('jstests/libs/override_methods/implicit_passthrough_to_shard_changestreams.js');
hooks:
- class: CheckReplDBHash
- class: CheckMetadataConsistencyInBackground

View File

@ -31,9 +31,9 @@ executor:
# change_streams.yml for detailed explanation.
eval: >-
globalThis.testingReplication = true;
load('jstests/libs/override_methods/set_read_and_write_concerns.js');
load('jstests/libs/override_methods/implicit_whole_cluster_changestreams.js');
load('jstests/libs/override_methods/enable_causal_consistency_without_read_pref.js');
await import('jstests/libs/override_methods/set_read_and_write_concerns.js');
await import('jstests/libs/override_methods/implicit_whole_cluster_changestreams.js');
await import('jstests/libs/override_methods/enable_causal_consistency_without_read_pref.js');
hooks:
# The CheckReplDBHash hook waits until all operations have replicated to and have been applied
# on the secondaries, so we run the ValidateCollections hook after it to ensure we're

View File

@ -32,9 +32,9 @@ executor:
# change_streams.yml for detailed explanation.
eval: >-
globalThis.testingReplication = true;
load('jstests/libs/override_methods/set_read_and_write_concerns.js');
load('jstests/libs/override_methods/implicit_whole_db_changestreams.js');
load('jstests/libs/override_methods/enable_causal_consistency_without_read_pref.js');
await import('jstests/libs/override_methods/set_read_and_write_concerns.js');
await import('jstests/libs/override_methods/implicit_whole_db_changestreams.js');
await import('jstests/libs/override_methods/enable_causal_consistency_without_read_pref.js');
hooks:
# The CheckReplDBHash hook waits until all operations have replicated to and have been applied
# on the secondaries, so we run the ValidateCollections hook after it to ensure we're

View File

@ -221,8 +221,8 @@ executor:
shell_options:
eval: >-
globalThis.testingReplication = true;
load("jstests/libs/override_methods/set_read_preference_secondary.js");
load('jstests/libs/override_methods/enable_causal_consistency_without_read_pref.js');
await import("jstests/libs/override_methods/set_read_preference_secondary.js");
await import('jstests/libs/override_methods/enable_causal_consistency_without_read_pref.js');
global_vars:
TestData:
defaultReadPreference: {mode: "secondaryPreferred", tags: [{tag: "INIT_SYNC"}, {}]}

View File

@ -18,7 +18,7 @@ executor:
shell_options:
crashOnInvalidBSONError: ""
objcheck: ""
eval: load("jstests/libs/override_methods/detect_spawning_own_mongod.js");
eval: await import("jstests/libs/override_methods/detect_spawning_own_mongod.js");
hooks:
- class: ValidateCollections
shell_options:

View File

@ -30,7 +30,7 @@ executor:
shell_options:
eval: >-
globalThis.testingReplication = true;
load("jstests/libs/override_methods/hide_column_store_indexes_from_get_indexes.js");
await import("jstests/libs/override_methods/hide_column_store_indexes_from_get_indexes.js");
hooks:
- class: ValidateCollections
- class: CleanEveryN

View File

@ -62,7 +62,7 @@ executor:
shell_options:
eval: >-
globalThis.testingReplication = true;
load("jstests/libs/override_methods/implicit_wildcard_indexes.js");
await import("jstests/libs/override_methods/implicit_wildcard_indexes.js");
hooks:
- class: ValidateCollections
- class: CleanEveryN

View File

@ -13,8 +13,8 @@ executor:
crashOnInvalidBSONError: ""
objcheck: ""
eval: |
load("jstests/libs/override_methods/detect_spawning_own_mongod.js");
load("jstests/libs/set_force_bonsai.js");
await import("jstests/libs/override_methods/detect_spawning_own_mongod.js");
await import("jstests/libs/set_force_bonsai.js");
hooks:
- class: ValidateCollections
shell_options:

View File

@ -17,8 +17,8 @@ executor:
crashOnInvalidBSONError: ""
objcheck: ""
eval: |
load("jstests/libs/override_methods/detect_spawning_own_mongod.js");
load("jstests/libs/set_force_bonsai.js");
await import("jstests/libs/override_methods/detect_spawning_own_mongod.js");
await import("jstests/libs/set_force_bonsai.js");
hooks:
- class: ValidateCollections
shell_options:

View File

@ -19,8 +19,8 @@ executor:
config:
shell_options:
eval: |
load("jstests/libs/override_methods/detect_spawning_own_mongod.js");
load("jstests/libs/set_try_bonsai_experimental.js");
await import("jstests/libs/override_methods/detect_spawning_own_mongod.js");
await import("jstests/libs/set_try_bonsai_experimental.js");
hooks:
- class: ValidateCollections
- class: CleanEveryN

View File

@ -25,8 +25,8 @@ executor:
crashOnInvalidBSONError: ""
objcheck: ""
eval: |
load("jstests/libs/override_methods/detect_spawning_own_mongod.js");
load("jstests/libs/set_try_bonsai_experimental.js");
await import("jstests/libs/override_methods/detect_spawning_own_mongod.js");
await import("jstests/libs/set_try_bonsai_experimental.js");
hooks:
- class: ValidateCollections
shell_options:

View File

@ -30,4 +30,4 @@ executor:
config:
shell_options:
nodb: ''
eval: load("jstests/libs/set_try_bonsai_experimental.js");
eval: await import("jstests/libs/set_try_bonsai_experimental.js");

View File

@ -13,8 +13,8 @@ executor:
crashOnInvalidBSONError: ""
objcheck: ""
eval: |
load("jstests/libs/override_methods/detect_spawning_own_mongod.js");
load("jstests/libs/set_force_bonsai.js");
await import("jstests/libs/override_methods/detect_spawning_own_mongod.js");
await import("jstests/libs/set_force_bonsai.js");
hooks:
- class: ValidateCollections
shell_options:

View File

@ -792,7 +792,7 @@ executor:
- ValidateCollections
config:
shell_options:
eval: load("jstests/libs/override_methods/detect_spawning_own_mongod.js");
eval: await import("jstests/libs/override_methods/detect_spawning_own_mongod.js");
hooks:
- class: ValidateCollections
shell_options:

View File

@ -47,7 +47,7 @@ executor:
shell_options:
eval: >-
globalThis.testingReplication = true;
load('jstests/libs/override_methods/set_read_preference_secondary.js');
await import('jstests/libs/override_methods/set_read_preference_secondary.js');
hooks:
# The CheckReplDBHash hook waits until all operations have replicated to and have been applied
# on the secondaries, so we run the ValidateCollections hook after it to ensure we're

View File

@ -95,7 +95,7 @@ executor:
shell_options:
eval: >-
globalThis.testingReplication = true;
load("jstests/libs/override_methods/retry_aborted_db_and_index_creation.js");
await import("jstests/libs/override_methods/retry_aborted_db_and_index_creation.js");
hooks:
- class: CheckReplOplogs
- class: CheckReplDBHash

View File

@ -13,7 +13,7 @@ executor:
global_vars:
TestData:
checkForInterruptFailpointChance: 0.05
eval: load('jstests/libs/jstestfuzz/check_for_interrupt_hook.js')
eval: await import('jstests/libs/jstestfuzz/check_for_interrupt_hook.js')
crashOnInvalidBSONError: ""
objcheck: ""
hooks:

View File

@ -15,7 +15,7 @@ executor:
global_vars:
TestData:
checkForInterruptFailpointChance: 0.05
eval: load('jstests/libs/jstestfuzz/check_for_interrupt_hook.js')
eval: await import('jstests/libs/jstestfuzz/check_for_interrupt_hook.js')
crashOnInvalidBSONError: ""
objcheck: ""
hooks:

View File

@ -12,7 +12,7 @@ executor:
- ValidateCollections
config:
shell_options:
eval: load("jstests/libs/override_methods/enable_sessions.js")
eval: await import("jstests/libs/override_methods/enable_sessions.js")
crashOnInvalidBSONError: ""
objcheck: ""
hooks:

View File

@ -12,7 +12,7 @@ executor:
- ValidateCollections
config:
shell_options:
eval: load("jstests/libs/override_methods/enable_causal_consistency.js")
eval: await import("jstests/libs/override_methods/enable_causal_consistency.js")
crashOnInvalidBSONError: ""
objcheck: ""
global_vars:

View File

@ -12,7 +12,7 @@ executor:
- ValidateCollections
config:
shell_options:
eval: load("jstests/libs/override_methods/enable_sessions.js")
eval: await import("jstests/libs/override_methods/enable_sessions.js")
crashOnInvalidBSONError: ""
objcheck: ""
hooks:

View File

@ -288,10 +288,10 @@ executor:
shell_options:
eval: >-
globalThis.testingReplication = true;
load('jstests/libs/override_methods/implicitly_shard_accessed_collections.js');
load('jstests/libs/override_methods/enable_sessions.js');
load('jstests/libs/override_methods/txn_passthrough_cmd_massage.js');
load('jstests/libs/override_methods/network_error_and_txn_override.js');
await import('jstests/libs/override_methods/implicitly_shard_accessed_collections.js');
await import('jstests/libs/override_methods/enable_sessions.js');
await import('jstests/libs/override_methods/txn_passthrough_cmd_massage.js');
await import('jstests/libs/override_methods/network_error_and_txn_override.js');
global_vars:
TestData:
defaultReadConcernLevel: "local"

View File

@ -305,10 +305,10 @@ executor:
shell_options:
eval: >-
globalThis.testingReplication = true;
load('jstests/libs/override_methods/implicitly_shard_accessed_collections.js');
load('jstests/libs/override_methods/enable_sessions.js');
load('jstests/libs/override_methods/txn_passthrough_cmd_massage.js');
load('jstests/libs/override_methods/network_error_and_txn_override.js');
await import('jstests/libs/override_methods/implicitly_shard_accessed_collections.js');
await import('jstests/libs/override_methods/enable_sessions.js');
await import('jstests/libs/override_methods/txn_passthrough_cmd_massage.js');
await import('jstests/libs/override_methods/network_error_and_txn_override.js');
global_vars:
TestData:
defaultReadConcernLevel: "majority"

View File

@ -357,12 +357,12 @@ executor:
# to denylist tests that uses them unsafely.
eval: >-
globalThis.testingReplication = true;
load('jstests/libs/override_methods/network_error_and_txn_override.js');
await import('jstests/libs/override_methods/network_error_and_txn_override.js');
globalThis.db = connect(TestData.connectionString);
load("jstests/libs/override_methods/enable_sessions.js");
load("jstests/libs/override_methods/fail_unclean_shutdown_start_parallel_shell.js");
load('jstests/libs/override_methods/txn_passthrough_cmd_massage.js');
load('jstests/libs/override_methods/implicitly_shard_accessed_collections.js');
await import("jstests/libs/override_methods/enable_sessions.js");
await import("jstests/libs/override_methods/fail_unclean_shutdown_start_parallel_shell.js");
await import('jstests/libs/override_methods/txn_passthrough_cmd_massage.js');
await import('jstests/libs/override_methods/implicitly_shard_accessed_collections.js');
global_vars:
TestData:
logRetryAttempts: true

View File

@ -355,12 +355,12 @@ executor:
# to denylist tests that uses them unsafely.
eval: >-
globalThis.testingReplication = true;
load('jstests/libs/override_methods/network_error_and_txn_override.js');
await import('jstests/libs/override_methods/network_error_and_txn_override.js');
globalThis.db = connect(TestData.connectionString);
load("jstests/libs/override_methods/enable_sessions.js");
load("jstests/libs/override_methods/fail_unclean_shutdown_start_parallel_shell.js");
load('jstests/libs/override_methods/txn_passthrough_cmd_massage.js');
load('jstests/libs/override_methods/implicitly_shard_accessed_collections.js');
await import("jstests/libs/override_methods/enable_sessions.js");
await import("jstests/libs/override_methods/fail_unclean_shutdown_start_parallel_shell.js");
await import('jstests/libs/override_methods/txn_passthrough_cmd_massage.js');
await import('jstests/libs/override_methods/implicitly_shard_accessed_collections.js');
global_vars:
TestData:
logRetryAttempts: true

View File

@ -319,11 +319,11 @@ executor:
shell_options:
eval: >-
globalThis.testingReplication = true;
load('jstests/libs/override_methods/implicitly_shard_accessed_collections.js');
await import("jstests/libs/override_methods/implicitly_shard_accessed_collections.js");
ImplicitlyShardAccessCollSettings.setMode(ImplicitlyShardAccessCollSettings.Modes.kHashedMoveToSingleShard);
load('jstests/libs/override_methods/enable_sessions.js');
load('jstests/libs/override_methods/txn_passthrough_cmd_massage.js');
load('jstests/libs/override_methods/network_error_and_txn_override.js');
await import("jstests/libs/override_methods/enable_sessions.js");
await import("jstests/libs/override_methods/txn_passthrough_cmd_massage.js");
await import("jstests/libs/override_methods/network_error_and_txn_override.js");
global_vars:
TestData:
networkErrorAndTxnOverrideConfig:

View File

@ -98,7 +98,7 @@ executor:
eval: |
jsTest.authenticate(db.getMongo());
globalThis.testingReplication = true;
load('jstests/libs/override_methods/inject_dollar_tenant.js');
await import('jstests/libs/override_methods/inject_dollar_tenant.js');
global_vars:
TestData: &TestData
tenant: "636d957b2646ddfaf9b5e13f"

View File

@ -81,7 +81,7 @@ executor:
shell_options:
eval: |
globalThis.testingReplication = true;
load('jstests/libs/override_methods/inject_security_token.js');
await import('jstests/libs/override_methods/inject_security_token.js');
hooks:
# The CheckReplDBHash hook waits until all operations have replicated to and have been applied
# on the secondaries, so we run the ValidateCollections hook after it to ensure we're

View File

@ -17,7 +17,7 @@ executor:
objcheck: ""
eval: |
// Keep in sync with query_golden_cqf.yml.
load("jstests/libs/override_methods/detect_spawning_own_mongod.js");
await import("jstests/libs/override_methods/detect_spawning_own_mongod.js");
await import("jstests/libs/override_methods/golden_overrides.js");
_openGoldenData(jsTestName(), {relativePath: "jstests/query_golden/expected_output"});
hooks:

View File

@ -15,8 +15,8 @@ executor:
objcheck: ""
eval: |
// Keep in sync with query_golden_classic.yml.
load("jstests/libs/override_methods/detect_spawning_own_mongod.js");
load("jstests/libs/set_force_bonsai.js");
await import("jstests/libs/override_methods/detect_spawning_own_mongod.js");
await import("jstests/libs/set_force_bonsai.js");
await import("jstests/libs/override_methods/golden_overrides.js");
_openGoldenData(jsTestName(), {relativePath: "jstests/query_golden/expected_output"});
hooks:

View File

@ -42,7 +42,7 @@ executor:
defaultReadConcernLevel: linearizable
eval: >-
globalThis.testingReplication = true;
load('jstests/libs/override_methods/set_read_and_write_concerns.js');
await import('jstests/libs/override_methods/set_read_and_write_concerns.js');
hooks:
# The CheckReplDBHash hook waits until all operations have replicated to and have been applied
# on the secondaries, so we run the ValidateCollections hook after it to ensure we're

View File

@ -37,7 +37,7 @@ executor:
defaultReadConcernLevel: majority
eval: >-
globalThis.testingReplication = true;
load('jstests/libs/override_methods/set_read_and_write_concerns.js');
await import('jstests/libs/override_methods/set_read_and_write_concerns.js');
hooks:
# The CheckReplDBHash hook waits until all operations have replicated to and have been applied
# on the secondaries, so we run the ValidateCollections hook after it to ensure we're

View File

@ -27,7 +27,7 @@ executor:
shell_options:
eval: >-
globalThis.testingReplication = true;
load('jstests/libs/override_methods/set_api_version.js');
await import('jstests/libs/override_methods/set_api_version.js');
hooks:
# The CheckReplDBHash hook waits until all operations have replicated to and have been applied
# on the secondaries, so we run the ValidateCollections hook after it to ensure we're

View File

@ -246,9 +246,9 @@ executor:
shell_options:
eval: >-
globalThis.testingReplication = true;
load('jstests/libs/override_methods/enable_sessions.js');
load('jstests/libs/override_methods/txn_passthrough_cmd_massage.js');
load('jstests/libs/override_methods/network_error_and_txn_override.js');
await import('jstests/libs/override_methods/enable_sessions.js');
await import('jstests/libs/override_methods/txn_passthrough_cmd_massage.js');
await import('jstests/libs/override_methods/network_error_and_txn_override.js');
global_vars:
TestData:
networkErrorAndTxnOverrideConfig:

View File

@ -310,12 +310,12 @@ executor:
shell_options:
eval: >-
globalThis.testingReplication = true;
load('jstests/libs/override_methods/network_error_and_txn_override.js');
await import('jstests/libs/override_methods/network_error_and_txn_override.js');
globalThis.db = connect(TestData.connectionString);
load("jstests/libs/override_methods/enable_sessions.js");
load("jstests/libs/override_methods/fail_unclean_shutdown_incompatible_commands.js");
load("jstests/libs/override_methods/fail_unclean_shutdown_start_parallel_shell.js");
load('jstests/libs/override_methods/txn_passthrough_cmd_massage.js');
await import("jstests/libs/override_methods/enable_sessions.js");
await import("jstests/libs/override_methods/fail_unclean_shutdown_incompatible_commands.js");
await import("jstests/libs/override_methods/fail_unclean_shutdown_start_parallel_shell.js");
await import('jstests/libs/override_methods/txn_passthrough_cmd_massage.js');
global_vars:
TestData:
logRetryAttempts: true

View File

@ -292,10 +292,10 @@ executor:
shell_options:
eval: >-
globalThis.testingReplication = true;
load('jstests/libs/override_methods/network_error_and_txn_override.js');
await import('jstests/libs/override_methods/network_error_and_txn_override.js');
globalThis.db = connect(TestData.connectionString);
load("jstests/libs/override_methods/enable_sessions.js");
load('jstests/libs/override_methods/txn_passthrough_cmd_massage.js');
await import("jstests/libs/override_methods/enable_sessions.js");
await import('jstests/libs/override_methods/txn_passthrough_cmd_massage.js');
global_vars:
TestData:
logRetryAttempts: true

Some files were not shown because too many files have changed in this diff Show More