summaryrefslogtreecommitdiff
path: root/src/mongo
diff options
context:
space:
mode:
authorJustin Seyster <justin.seyster@mongodb.com>2022-07-12 21:25:08 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2022-07-12 21:56:32 +0000
commit466b1aa7bd0805f6f8b340cd23c447812357e1ed (patch)
tree9dd1a1ad5a25d61d7fca936c95c577c18bef5215 /src/mongo
parent873861d772dfdee7bf7d6b98f0657d59779c9e88 (diff)
downloadmongo-466b1aa7bd0805f6f8b340cd23c447812357e1ed.tar.gz
SERVER-67979 Relax 'numSpills' check in ColumnStoreSorter test
Diffstat (limited to 'src/mongo')
-rw-r--r--src/mongo/db/index/column_store_sorter_test.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mongo/db/index/column_store_sorter_test.cpp b/src/mongo/db/index/column_store_sorter_test.cpp
index 4912070711a..85c1005efad 100644
--- a/src/mongo/db/index/column_store_sorter_test.cpp
+++ b/src/mongo/db/index/column_store_sorter_test.cpp
@@ -75,7 +75,7 @@ TEST(ColumnStoreSorter, SortTest) {
SorterFileStats statsForExternalSorter;
auto externalSorter = std::make_unique<ColumnStoreSorter>(
- 575 /* maxMemoryUsageBytes */, "dbName", &statsForExternalSorter);
+ 500 /* maxMemoryUsageBytes */, "dbName", &statsForExternalSorter);
// First, load documents into each sorter.
for (size_t i = 0; i < sampleData.size(); ++i) {
@@ -121,10 +121,10 @@ TEST(ColumnStoreSorter, SortTest) {
// Ensure that statistics for spills and file accesses are as expected.
// Note: The number of spills in the external sorter depends on the size of C++ data structures,
- // which can change with standard library changes, meaning that this check may need to be
- // updated.
+ // which can be different between architectures. The test allows a range of reasonable values.
ASSERT_EQ(0, inMemorySorter->numSpills());
- ASSERT_EQ(4, externalSorter->numSpills());
+ ASSERT_LTE(3, externalSorter->numSpills());
+ ASSERT_GTE(5, externalSorter->numSpills());
ASSERT_EQ(0, statsForInMemorySorter.opened.load());
ASSERT_EQ(0, statsForInMemorySorter.closed.load());