summaryrefslogtreecommitdiff
path: root/test/buildtool/storage/large_object_cas.test.cpp
diff options
context:
space:
mode:
authorMaksim Denisov <denisov.maksim@huawei.com>2024-07-01 18:16:17 +0200
committerMaksim Denisov <denisov.maksim@huawei.com>2024-07-05 12:58:35 +0200
commit595b7c27d175b56bd296b33dc535818a05cdbadd (patch)
tree75f946b36d51ff17e22c0ffece4ce3f291d18772 /test/buildtool/storage/large_object_cas.test.cpp
parentb5a29ec0daf024fde9bd06f76cab8a12fd509aab (diff)
downloadjustbuild-595b7c27d175b56bd296b33dc535818a05cdbadd.tar.gz
Pass StorageConfig to GarbageCollection
Diffstat (limited to 'test/buildtool/storage/large_object_cas.test.cpp')
-rw-r--r--test/buildtool/storage/large_object_cas.test.cpp14
1 files changed, 9 insertions, 5 deletions
diff --git a/test/buildtool/storage/large_object_cas.test.cpp b/test/buildtool/storage/large_object_cas.test.cpp
index 8723208e..45d428da 100644
--- a/test/buildtool/storage/large_object_cas.test.cpp
+++ b/test/buildtool/storage/large_object_cas.test.cpp
@@ -177,7 +177,8 @@ static void TestLarge() noexcept {
SECTION("Uplinking") {
// Increment generation:
- CHECK(GarbageCollector::TriggerGarbageCollection());
+ CHECK(GarbageCollector::TriggerGarbageCollection(
+ StorageConfig::Instance()));
// Check implicit splice:
auto spliced_path =
@@ -348,7 +349,8 @@ static void TestExternal() noexcept {
// External source is emulated by moving the large entry to an older
// generation and promoting the parts of the entry to the youngest
// generation:
- REQUIRE(GarbageCollector::TriggerGarbageCollection());
+ REQUIRE(GarbageCollector::TriggerGarbageCollection(
+ StorageConfig::Instance()));
for (auto const& part : *pack_1) {
static constexpr bool is_executable = false;
REQUIRE(cas.BlobPath(part, is_executable));
@@ -475,8 +477,9 @@ static void TestCompactification() {
// Compactify the youngest generation:
// Generation rotation is disabled to exclude uplinking.
- static constexpr bool no_rotation = true;
- REQUIRE(GarbageCollector::TriggerGarbageCollection(no_rotation));
+ static constexpr bool kNoRotation = true;
+ REQUIRE(GarbageCollector::TriggerGarbageCollection(
+ StorageConfig::Instance(), kNoRotation));
// All entries must be deleted during compactification, and for blobs
// and executables there are no synchronized entries in the storage:
@@ -582,7 +585,8 @@ TEST_CASE_METHOD(HermeticLocalTestFixture,
REQUIRE(FileSystemManager::RemoveFile(*large_tree_path));
// Rotate generations:
- REQUIRE(GarbageCollector::TriggerGarbageCollection());
+ REQUIRE(
+ GarbageCollector::TriggerGarbageCollection(StorageConfig::Instance()));
// Ask to splice the large tree:
auto result_path = cas.TreePath(*large_tree_digest);