diff options
author | Tyler Brock <tyler.brock@gmail.com> | 2023-01-29 18:00:36 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2023-01-29 18:42:13 +0000 |
commit | f6897efb24aea4d923b6646b2379fa64dd041480 (patch) | |
tree | 9e917d83155c748b7771e6e75e4dd8dd11877075 /jstests/sharding | |
parent | 5cb6cc2e6373272bf7fa3ac2f8e364910abedf93 (diff) | |
download | mongo-f6897efb24aea4d923b6646b2379fa64dd041480.tar.gz |
SERVER-72620 ensure shard added to $indexStats for unsharded collections
Diffstat (limited to 'jstests/sharding')
-rw-r--r-- | jstests/sharding/timeseries_cluster_indexstats.js | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/jstests/sharding/timeseries_cluster_indexstats.js b/jstests/sharding/timeseries_cluster_indexstats.js index 32dd3c70752..339c618b599 100644 --- a/jstests/sharding/timeseries_cluster_indexstats.js +++ b/jstests/sharding/timeseries_cluster_indexstats.js @@ -59,13 +59,7 @@ function checkIndexStats(coll, keys, sharded) { keys.length, `There should be ${keys.length} indices on the collection.\n${tojson(indices)}`); indices.forEach((index, i) => { - assert.eq(index.hasOwnProperty('shard'), - sharded, - sharded - ? `Index stats 'shard' field should exist on a sharded collection.\n${ - tojson(index)}` - : `Index stats 'shard' field should not exist on a non-sharded collection.\n${ - tojson(index)}`); + assert(index.hasOwnProperty('shard'), tojson(index)); assert.docEq( keys[i], index.key, `Index should have key spec ${tojson(keys[i])}.\n${tojson(index)}`); }); |