diff options
author | Alexander Neben <alexander.neben@mongodb.com> | 2022-12-27 16:46:12 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2022-12-27 17:53:33 +0000 |
commit | ce44e0462e027a79e610829d9933ed1878dc8253 (patch) | |
tree | 2a8d4f8f7a53653022079e050c63ece7a714af4c | |
parent | fd849606b1548ba0d47c01216d6fc1f7961f6e90 (diff) | |
download | mongo-ce44e0462e027a79e610829d9933ed1878dc8253.tar.gz |
SERVER-70553 Add module support to jstests
-rw-r--r-- | .eslintrc.yml | 4 | ||||
-rw-r--r-- | jstests/replsets/libs/secondary_reads_test.js | 4 | ||||
-rw-r--r-- | jstests/replsets/tenant_migration_concurrent_writes_on_donor_util.js | 5 |
3 files changed, 6 insertions, 7 deletions
diff --git a/.eslintrc.yml b/.eslintrc.yml index de2e6f3ba06..3bdb7d66a05 100644 --- a/.eslintrc.yml +++ b/.eslintrc.yml @@ -2,6 +2,10 @@ env: es6: true mongo: true +parserOptions: + ecmaVersion: 6 + sourceType: "module" + rules: # Rules are documented at http://eslint.org/docs/rules/ no-cond-assign: 2 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/tenant_migration_concurrent_writes_on_donor_util.js b/jstests/replsets/tenant_migration_concurrent_writes_on_donor_util.js index 50455203405..4a31b6f4dc8 100644 --- a/jstests/replsets/tenant_migration_concurrent_writes_on_donor_util.js +++ b/jstests/replsets/tenant_migration_concurrent_writes_on_donor_util.js @@ -240,11 +240,6 @@ function databaseExists(db, dbName) { return res.databases.some((dbDoc => dbDoc.name === dbName)); } -function collectionExists(db, collName) { - const res = assert.commandWorked(db.runCommand({listCollections: 1, filter: {name: collName}})); - return res.cursor.firstBatch.length == 1; -} - function indexExists(db, collName, targetIndex) { const res = assert.commandWorked(db.runCommand({listIndexes: collName})); return res.cursor.firstBatch.some( |