diff options
author | Uladzimir Makouski <uladzimir.makouski@mongodb.com> | 2023-03-02 10:37:25 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2023-03-02 14:07:40 +0000 |
commit | cd856945e956ab34b792ee3abd247cf182f95209 (patch) | |
tree | 7ba6cae502d28c4bbb1d7301e7dd90655f0b0a8c /jstests/sharding/safe_secondary_reads_single_migration_waitForDelete.js | |
parent | b960941f0e9b86bd7c75121b343b03c20d72489e (diff) | |
download | mongo-cd856945e956ab34b792ee3abd247cf182f95209.tar.gz |
Revert "SERVER-74416 Make sure analyzeShardKey and configureQueryAnalyzer command use database and shard versioning"
This reverts commit 5c4d7fcb0ed77081dfe435a2e3056ae40b4af68a.
Diffstat (limited to 'jstests/sharding/safe_secondary_reads_single_migration_waitForDelete.js')
-rw-r--r-- | jstests/sharding/safe_secondary_reads_single_migration_waitForDelete.js | 26 |
1 files changed, 4 insertions, 22 deletions
diff --git a/jstests/sharding/safe_secondary_reads_single_migration_waitForDelete.js b/jstests/sharding/safe_secondary_reads_single_migration_waitForDelete.js index 33393b14cfa..70290373a5c 100644 --- a/jstests/sharding/safe_secondary_reads_single_migration_waitForDelete.js +++ b/jstests/sharding/safe_secondary_reads_single_migration_waitForDelete.js @@ -31,7 +31,6 @@ let nss = db + "." + coll; let validateTestCase = function(test) { assert(test.setUp && typeof (test.setUp) === "function"); assert(test.command && typeof (test.command) === "object"); - assert(test.runsAgainstAdminDb ? typeof (test.runsAgainstAdminDb) === "boolean" : true); assert(test.checkResults && typeof (test.checkResults) === "function"); assert(test.behavior === "unshardedOnly" || test.behavior === "targetsPrimaryUsesConnectionVersioning" || @@ -110,23 +109,7 @@ let testCases = { behavior: "versioned" }, analyze: {skip: "primary only"}, - analyzeShardKey: { - setUp: function(mongosConn) { - const docs = []; - for (let i = 1; i <= 1000; i++) { - docs.push({x: i}); - } - assert.commandWorked(mongosConn.getCollection(nss).insert(docs)); - }, - command: {analyzeShardKey: nss, key: {x: 1}}, - runsAgainstAdminDb: true, - checkResults: function(res) { - // The command should work and return correct results. - assert.commandWorked(res); - assert.eq(res.numDocs, 1000, res); - }, - behavior: "versioned" - }, + analyzeShardKey: {skip: "does not return user data"}, appendOplogNote: {skip: "primary only"}, applyOps: {skip: "primary only"}, authenticate: {skip: "does not return user data"}, @@ -472,10 +455,9 @@ for (let command of commands) { writeConcern: {w: 2}, })); - let res = staleMongos.getDB(test.runsAgainstAdminDb ? "admin" : db) - .runCommand(Object.extend( - test.command, - {$readPreference: {mode: 'secondary'}, readConcern: {'level': 'local'}})); + let res = staleMongos.getDB(db).runCommand(Object.extend( + test.command, {$readPreference: {mode: 'secondary'}, readConcern: {'level': 'local'}})); + test.checkResults(res); // Build the query to identify the operation in the system profiler. |