diff options
author | Pol Pinol Castuera <pol.pinol@mongodb.com> | 2022-11-24 07:37:58 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2022-11-24 08:20:16 +0000 |
commit | 1557a827b0ea179cf64b3e4139169033e2181a59 (patch) | |
tree | 4b10be27f61f1584d3e69b02dbf9806580200429 /jstests/sharding | |
parent | 637fb52801843d2dc1b9dd212116d0ec2973e8d5 (diff) | |
download | mongo-1557a827b0ea179cf64b3e4139169033e2181a59.tar.gz |
SERVER-71477 Check '_internalAllCollectionStatsSpec.getStats()' exists before calling 'makeStatsForNs'
Diffstat (limited to 'jstests/sharding')
-rw-r--r-- | jstests/sharding/all_collection_stats.js | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/jstests/sharding/all_collection_stats.js b/jstests/sharding/all_collection_stats.js index 5ef72a2dee8..2fd89236e70 100644 --- a/jstests/sharding/all_collection_stats.js +++ b/jstests/sharding/all_collection_stats.js @@ -67,6 +67,10 @@ for (let i = 0; i < 20; i++) { assert(exists); } +// Test valid query with empty specification +assert.commandWorked( + adminDb.runCommand({aggregate: 1, pipeline: [{$_internalAllCollectionStats: {}}], cursor: {}})); + // Test invalid queries/values. assert.commandFailedWithCode( adminDb.runCommand({aggregate: 1, pipeline: [{$_internalAllCollectionStats: 3}], cursor: {}}), |