diff options
author | Geir Storli <geirst@verizonmedia.com> | 2021-09-21 14:15:13 +0000 |
---|---|---|
committer | Geir Storli <geirst@verizonmedia.com> | 2021-09-21 14:15:13 +0000 |
commit | 432b51fd8f93f04a8ad12e2bbe65dbbe8e5c83b6 (patch) | |
tree | c574c9b240b411d0103403f98d71caca1ee05696 /searchcore/src/tests | |
parent | 302ddbdeee930c9e951aa5d0b2004c731b621e3d (diff) |
Remove explicit tracking of enum store and multi-value address space usage.
This has been replaced by generic tracking of address space usage
among components in attributes vectors in all sub databases.
Diffstat (limited to 'searchcore/src/tests')
-rw-r--r-- | searchcore/src/tests/proton/attribute/attribute_usage_filter/attribute_usage_filter_test.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/searchcore/src/tests/proton/attribute/attribute_usage_filter/attribute_usage_filter_test.cpp b/searchcore/src/tests/proton/attribute/attribute_usage_filter/attribute_usage_filter_test.cpp index 18b9962003c..b19c9163254 100644 --- a/searchcore/src/tests/proton/attribute/attribute_usage_filter/attribute_usage_filter_test.cpp +++ b/searchcore/src/tests/proton/attribute/attribute_usage_filter/attribute_usage_filter_test.cpp @@ -12,6 +12,7 @@ LOG_SETUP("attribute_usage_filter_test"); using proton::AttributeUsageFilter; using proton::AttributeUsageStats; using proton::IAttributeUsageListener; +using search::AddressSpaceComponents; using search::AddressSpaceUsage; using vespalib::AddressSpace; @@ -27,17 +28,15 @@ class MyAttributeStats : public AttributeUsageStats { public: void triggerEnumStoreLimit() { - merge({ enumStoreOverLoad, - search::AddressSpaceComponents::default_multi_value_usage() }, - "enumeratedName", - "ready"); + AddressSpaceUsage usage; + usage.set(AddressSpaceComponents::enum_store, enumStoreOverLoad); + merge(usage, "enumeratedName", "ready"); } void triggerMultiValueLimit() { - merge({ search::AddressSpaceComponents::default_enum_store_usage(), - multiValueOverLoad }, - "multiValueName", - "ready"); + AddressSpaceUsage usage; + usage.set(AddressSpaceComponents::multi_value, multiValueOverLoad); + merge(usage, "multiValueName", "ready"); } }; @@ -130,7 +129,8 @@ TEST_F("Check that multivalue limit can be reached", Fixture) TEST_F("listener is updated when attribute stats change", Fixture) { AttributeUsageStats stats; - AddressSpaceUsage usage(AddressSpace(12, 10, 15), AddressSpace(22, 20, 25)); + AddressSpaceUsage usage; + usage.set("my_comp", AddressSpace(12, 10, 15)); stats.merge(usage, "my_attr", "my_subdb"); f.setAttributeStats(stats); EXPECT_EQUAL(stats, f.listener->stats); |