summaryrefslogtreecommitdiffstats
path: root/searchlib/src/tests/attribute/compaction
diff options
context:
space:
mode:
authorTor Egge <Tor.Egge@online.no>2021-04-09 13:28:14 +0200
committerTor Egge <Tor.Egge@online.no>2021-04-09 13:34:07 +0200
commit4977b304ca6e5468af47b91bd8526e1615a34fe1 (patch)
treee44fbfa3e61f518128cc88f1d51b36c5a5e88cd3 /searchlib/src/tests/attribute/compaction
parentcef30b122011ac98ef5b398eed50df942d95d9c6 (diff)
Add CompactionStrategy methods to determine if compaction should be performed.
Diffstat (limited to 'searchlib/src/tests/attribute/compaction')
-rw-r--r--searchlib/src/tests/attribute/compaction/attribute_compaction_test.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/searchlib/src/tests/attribute/compaction/attribute_compaction_test.cpp b/searchlib/src/tests/attribute/compaction/attribute_compaction_test.cpp
index c3bb9481f0f..a029373821a 100644
--- a/searchlib/src/tests/attribute/compaction/attribute_compaction_test.cpp
+++ b/searchlib/src/tests/attribute/compaction/attribute_compaction_test.cpp
@@ -237,8 +237,7 @@ TEST_F("Compaction limits address space usage (dead) when free lists are NOT use
{
populate_and_hammer(f, true);
AddressSpace afterSpace = f.getMultiValueAddressSpaceUsage("after");
- // DEAD_ARRAYS_SLACK in multi value mapping is is 64k
- EXPECT_GREATER(65536u, afterSpace.dead());
+ EXPECT_GREATER(search::CompactionStrategy::DEAD_ADDRESS_SPACE_SLACK, afterSpace.dead());
}
TEST_F("Compaction is not executed when free lists are used",
@@ -267,8 +266,7 @@ TEST_F("Compaction is peformed when compaction strategy is changed to enable com
f._v->commit(); // new commit might trigger further compaction
after2 = f.getMultiValueAddressSpaceUsage("after2");
}
- // DEAD_ARRAYS_SLACK in multi value mapping is is 64k
- EXPECT_GREATER(65536u, after2.dead());
+ EXPECT_GREATER(search::CompactionStrategy::DEAD_ADDRESS_SPACE_SLACK, after2.dead());
}
TEST_MAIN() { TEST_RUN_ALL(); }