summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPol Pinol Castuera <pol.pinol@mongodb.com>2022-10-28 06:29:35 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2022-10-31 10:24:32 +0000
commit7452920695f74479c0e53e37a8aa01e800e58344 (patch)
treeb89d7b70edb0a9971bfe098b740c3b40be7ca00e
parent9a4eb46f3d438bf6a07143c7c5a9fd2049a9a5e8 (diff)
downloadmongo-7452920695f74479c0e53e37a8aa01e800e58344.tar.gz
SERVER-69773 Fix entire json comparison from $_internalAllCollectionStats testing
(cherry picked from commit 9ef93f783419da5734d3afdf84e987ed39a1591f)
-rw-r--r--jstests/sharding/all_collection_stats.js11
1 files changed, 10 insertions, 1 deletions
diff --git a/jstests/sharding/all_collection_stats.js b/jstests/sharding/all_collection_stats.js
index f15ee931039..00cdc639082 100644
--- a/jstests/sharding/all_collection_stats.js
+++ b/jstests/sharding/all_collection_stats.js
@@ -49,7 +49,16 @@ for (let i = 0; i < 20; i++) {
if (dbName + "." + coll === ns) {
assert.eq(data.host, expectedResults[0].host);
assert.eq(data.shard, expectedResults[0].shard);
- assert.eq(tojson(data.storageStats), tojson(expectedResults[0].storageStats));
+ assert.eq(data.storageStats.size, expectedResults[0].storageStats.size);
+ assert.eq(data.storageStats.count, expectedResults[0].storageStats.count);
+ assert.eq(data.storageStats.avgObjSize, expectedResults[0].storageStats.avgObjSize);
+ assert.eq(data.storageStats.storageSize, expectedResults[0].storageStats.storageSize);
+ assert.eq(data.storageStats.freeStorageSize,
+ expectedResults[0].storageStats.freeStorageSize);
+ assert.eq(data.storageStats.nindexes, expectedResults[0].storageStats.nindexes);
+ assert.eq(data.storageStats.totalIndexSize,
+ expectedResults[0].storageStats.totalIndexSize);
+ assert.eq(data.storageStats.totalSize, expectedResults[0].storageStats.totalSize);
exists = true;
break;
}