diff options
Diffstat (limited to 'jstests/core/index_stats.js')
| -rw-r--r-- | jstests/core/index_stats.js | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/jstests/core/index_stats.js b/jstests/core/index_stats.js index b0abd2e35a1..43df9a63ed1 100644 --- a/jstests/core/index_stats.js +++ b/jstests/core/index_stats.js @@ -12,25 +12,18 @@ // # Tenant migrations passthrough suites automatically retry operations on TenantMigrationAborted // # errors. // tenant_migration_incompatible, -// references_foreign_collection, // ] (function() { "use strict"; load("jstests/libs/analyze_plan.js"); -load("jstests/libs/sbe_util.js"); // For checkSBEEnabled. -load('jstests/libs/fixture_helpers.js'); // For 'FixtureHelpers' +load("jstests/libs/sbe_util.js"); // For checkSBEEnabled. var colName = "jstests_index_stats"; var col = db[colName]; col.drop(); -function checkSBEEnabledOnHostingDB(db, featureFlags = []) { - return checkSBEEnabled(FixtureHelpers.getPrimaryForNodeHostingDatabase(db).getDB(db.getName()), - featureFlags); -} - var getUsageCount = function(indexName, collection) { collection = collection || col; var cursor = collection.aggregate([{$indexStats: {}}]); @@ -241,7 +234,7 @@ assert.eq(2, ]) .itcount()); assert.eq(1, getUsageCount("_id_", col), "Expected aggregation to use _id index"); -if (!checkSBEEnabledOnHostingDB(db, ["featureFlagSBELookupPushdown"])) { +if (!checkSBEEnabled(db, ["featureFlagSBELookupPushdown"])) { assert.eq(2, getUsageCount("_id_", foreignCollection), "Expected each lookup to be tracked as an index use"); @@ -279,7 +272,7 @@ const pipeline = [ ]; assert.eq(2, col.aggregate(pipeline).itcount()); assert.eq(1, getUsageCount("_id_", col), "Expected aggregation to use _id index"); -if (!checkSBEEnabledOnHostingDB(db, ["featureFlagSBELookupPushdown"])) { +if (!checkSBEEnabled(db, ["featureFlagSBELookupPushdown"])) { assert.eq(2, getUsageCount("_id_", foreignCollection), "Expected each lookup to be tracked as an index use"); |
