diff options
Diffstat (limited to 'searchcore/src/tests')
-rw-r--r-- | searchcore/src/tests/proton/attribute/attribute_manager/attribute_manager_test.cpp | 9 | ||||
-rw-r--r-- | searchcore/src/tests/proton/documentdb/document_subdbs/document_subdbs_test.cpp | 7 |
2 files changed, 16 insertions, 0 deletions
diff --git a/searchcore/src/tests/proton/attribute/attribute_manager/attribute_manager_test.cpp b/searchcore/src/tests/proton/attribute/attribute_manager/attribute_manager_test.cpp index 0e3445d0785..a66785cb567 100644 --- a/searchcore/src/tests/proton/attribute/attribute_manager/attribute_manager_test.cpp +++ b/searchcore/src/tests/proton/attribute/attribute_manager/attribute_manager_test.cpp @@ -865,6 +865,15 @@ TEST_F("require that shrink flushtarget is handed over to new attribute manager" EXPECT_EQUAL(am1->getShrinker("a1"), am3->getShrinker("a1")); } +TEST_F("transient resource usage is zero in steady state", Fixture) +{ + f.addAttribute("a1"); + f.addAttribute("a2"); + auto usage = f._m.get_transient_resource_usage(); + EXPECT_EQUAL(0u, usage.disk()); + EXPECT_EQUAL(0u, usage.memory()); +} + TEST_MAIN() { std::filesystem::remove_all(std::filesystem::path(test_dir)); diff --git a/searchcore/src/tests/proton/documentdb/document_subdbs/document_subdbs_test.cpp b/searchcore/src/tests/proton/documentdb/document_subdbs/document_subdbs_test.cpp index 12477469e04..43717fc724f 100644 --- a/searchcore/src/tests/proton/documentdb/document_subdbs/document_subdbs_test.cpp +++ b/searchcore/src/tests/proton/documentdb/document_subdbs/document_subdbs_test.cpp @@ -749,6 +749,13 @@ TEST_F("require that flush targets can be retrieved", SearchableFixture) EXPECT_TRUE(assertTarget("subdb.summary.shrink", FType::GC, FComponent::DOCUMENT_STORE, *targets[9])); } +TEST_F("transient resource usage is zero in steady state", SearchableFixture) +{ + auto usage = f._subDb.get_transient_resource_usage(); + EXPECT_EQUAL(0u, usage.disk()); + EXPECT_EQUAL(0u, usage.memory()); +} + TEST_F("require that only fast-access attributes are instantiated", FastAccessOnlyFixture) { std::vector<AttributeGuard> attrs; |