diff options
author | Matt Broadstone <mbroadst@mongodb.com> | 2022-11-10 15:57:44 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2022-11-10 16:57:58 +0000 |
commit | 5f48de0b74f684bceac80a3a237a2a0f197f23d6 (patch) | |
tree | 088cb427b79c2edd2b6be4c581f0ce3396c5f930 /jstests/replsets | |
parent | d5ff440817391833df0ee8d918689cef60140d90 (diff) | |
download | mongo-5f48de0b74f684bceac80a3a237a2a0f197f23d6.tar.gz |
SERVER-70553 Add ES Modules support to mongo test runner
Diffstat (limited to 'jstests/replsets')
4 files changed, 4 insertions, 11 deletions
diff --git a/jstests/replsets/libs/secondary_reads_test.js b/jstests/replsets/libs/secondary_reads_test.js index 4840708dba2..9c91c871b84 100644 --- a/jstests/replsets/libs/secondary_reads_test.js +++ b/jstests/replsets/libs/secondary_reads_test.js @@ -99,8 +99,8 @@ function SecondaryReadsTest(name = "secondary_reads_test") { assert.gt(readers.length, 0, "no readers to stop"); assert.commandWorked(primaryDB.getCollection(signalColl).insert({_id: testDoneId})); for (let i = 0; i < readers.length; i++) { - const await = readers[i]; - await (); + const awaitReader = readers[i]; + awaitReader(); print("reader " + i + " done"); } readers = []; diff --git a/jstests/replsets/read_operations_during_step_down.js b/jstests/replsets/read_operations_during_step_down.js index 1c277d24501..6b80a80d888 100644 --- a/jstests/replsets/read_operations_during_step_down.js +++ b/jstests/replsets/read_operations_during_step_down.js @@ -28,8 +28,7 @@ TestData.dbName = dbName; TestData.collName = collName; jsTestLog("1. Do a document write"); -assert.commandWorked( - primaryColl.insert({_id: 0}, {"writeConcern": {"w": "majority"}})); +assert.commandWorked(primaryColl.insert({_id: 0}, {"writeConcern": {"w": "majority"}})); rst.awaitReplication(); // Open a cursor on primary. diff --git a/jstests/replsets/read_operations_during_step_up.js b/jstests/replsets/read_operations_during_step_up.js index f3a7bb96008..643059e837b 100644 --- a/jstests/replsets/read_operations_during_step_up.js +++ b/jstests/replsets/read_operations_during_step_up.js @@ -32,8 +32,7 @@ TestData.dbName = dbName; TestData.collName = collName; jsTestLog("1. Do a document write"); -assert.commandWorked( - primaryColl.insert({_id: 0}, {"writeConcern": {"w": "majority"}})); +assert.commandWorked(primaryColl.insert({_id: 0}, {"writeConcern": {"w": "majority"}})); rst.awaitReplication(); // It's possible for notPrimaryUnacknowledgedWrites to be non-zero because of mirrored reads during diff --git a/jstests/replsets/tenant_migration_concurrent_writes_on_donor_util.js b/jstests/replsets/tenant_migration_concurrent_writes_on_donor_util.js index 851c3bad41d..dc6752874ab 100644 --- a/jstests/replsets/tenant_migration_concurrent_writes_on_donor_util.js +++ b/jstests/replsets/tenant_migration_concurrent_writes_on_donor_util.js @@ -214,11 +214,6 @@ TenantMigrationConcurrentWriteUtil.kTestIndex = { expireAfterSeconds: TenantMigrationConcurrentWriteUtil.kExpireAfterSeconds }; -function collectionExists(db, collName) { - const res = assert.commandWorked(db.runCommand({listCollections: 1, filter: {name: collName}})); - return res.cursor.firstBatch.length == 1; -} - function insertTestDoc(primaryDB, collName) { assert.commandWorked(primaryDB.runCommand( {insert: collName, documents: [TenantMigrationConcurrentWriteUtil.kTestDoc]})); |