summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArun Banala <arun.banala@mongodb.com>2022-11-10 12:59:16 -0800
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2022-11-10 23:51:28 +0000
commitebd7d857178f5585149a1a8d300aa3a5e10206a7 (patch)
tree53405f64b41d2e1108230e5044ce147d5d631610
parent0c82c0cfa3525721cf2269271b6978df85882bf8 (diff)
downloadmongo-ebd7d857178f5585149a1a8d300aa3a5e10206a7.tar.gz
SERVER-71261 Relax the document size assumption in document_value_test.cpp
-rw-r--r--src/mongo/db/exec/document_value/document_value_test.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/mongo/db/exec/document_value/document_value_test.cpp b/src/mongo/db/exec/document_value/document_value_test.cpp
index e461a6382a1..d6c8d1981d8 100644
--- a/src/mongo/db/exec/document_value/document_value_test.cpp
+++ b/src/mongo/db/exec/document_value/document_value_test.cpp
@@ -1016,8 +1016,10 @@ TEST(MetaFields, MetaFieldsIncludedInDocumentApproximateSize) {
const size_t bigMetadataDocSize = doc2.getApproximateSize();
ASSERT_GT(bigMetadataDocSize, smallMetadataDocSize);
- // Do a sanity check on the amount of space taken by metadata in document 2.
- ASSERT_LT(doc2.getMetadataApproximateSize(), 300U);
+ // Do a sanity check on the amount of space taken by metadata in document 2. Note that the size
+ // of certain data types may vary on different build variants, so we cannot assert on the exact
+ // size.
+ ASSERT_LT(doc2.getMetadataApproximateSize(), 400U);
Document emptyDoc;
ASSERT_LT(emptyDoc.getMetadataApproximateSize(), 100U);