diff options
Diffstat (limited to 'jstests/noPassthrough/queryStats/query_stats_agg_key.js')
| -rw-r--r-- | jstests/noPassthrough/queryStats/query_stats_agg_key.js | 64 |
1 files changed, 0 insertions, 64 deletions
diff --git a/jstests/noPassthrough/queryStats/query_stats_agg_key.js b/jstests/noPassthrough/queryStats/query_stats_agg_key.js deleted file mode 100644 index 0eec5525733..00000000000 --- a/jstests/noPassthrough/queryStats/query_stats_agg_key.js +++ /dev/null @@ -1,64 +0,0 @@ -/** - * This test confirms that query stats store key fields for an aggregate command are properly nested - * and none are missing. - * @tags: [requires_fcv_60] - */ -load("jstests/libs/query_stats_utils.js"); // For runCommandAndValidateQueryStats and - // withQueryStatsEnabled -(function() { -"use strict"; - -const collName = jsTestName(); -const aggregateCommandObj = { - aggregate: collName, - pipeline: [{"$out": "collOut"}], - allowDiskUse: false, - cursor: {batchSize: 2}, - maxTimeMS: 50 * 1000, - bypassDocumentValidation: false, - readConcern: {level: "local"}, - writeConcern: {w: 1}, - collation: {locale: "en_US", strength: 2}, - hint: {"v": 1}, - comment: "", - let : {}, - apiDeprecationErrors: false, - apiVersion: "1", - apiStrict: false, -}; - -const queryShapeAggregateFields = - ["cmdNs", "command", "pipeline", "allowDiskUse", "collation", "let"]; - -// The outer fields not nested inside queryShape. -const queryStatsAggregateKeyFields = [ - "queryShape", - "cursor", - "maxTimeMS", - "bypassDocumentValidation", - "comment", - "otherNss", - "apiDeprecationErrors", - "apiVersion", - "apiStrict", - "collectionType", - "client", - "hint", - "readConcern", - "writeConcern", - "cursor.batchSize", -]; - -withQueryStatsEnabled(collName, (coll) => { - // Have to create an index for hint not to fail. - assert.commandWorked(coll.createIndex({v: 1})); - - runCommandAndValidateQueryStats({ - coll: coll, - commandName: "aggregate", - commandObj: aggregateCommandObj, - shapeFields: queryShapeAggregateFields, - keyFields: queryStatsAggregateKeyFields - }); -}); -}());
\ No newline at end of file |
