diff options
author | Pol Pinol Castuera <pol.pinol@mongodb.com> | 2022-10-28 06:29:35 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2022-10-31 10:23:54 +0000 |
commit | 5048c43f1086b3775ee6de724d43a8755ed8a954 (patch) | |
tree | 9f40d97008cbe718d098f0f332df75c8d752ce64 /jstests/sharding | |
parent | a88f2994dd0a820b51efa1312fae542945fcc5b1 (diff) | |
download | mongo-5048c43f1086b3775ee6de724d43a8755ed8a954.tar.gz |
SERVER-69773 Fix entire json comparison from $_internalAllCollectionStats testing
(cherry picked from commit 9ef93f783419da5734d3afdf84e987ed39a1591f)
Diffstat (limited to 'jstests/sharding')
-rw-r--r-- | jstests/sharding/all_collection_stats.js | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/jstests/sharding/all_collection_stats.js b/jstests/sharding/all_collection_stats.js index cdf53ea4ee5..5ef72a2dee8 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; } |