aboutsummaryrefslogtreecommitdiffstats
path: root/searchcore/src/tests/proton/attribute/attribute_usage_filter/attribute_usage_filter_test.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'searchcore/src/tests/proton/attribute/attribute_usage_filter/attribute_usage_filter_test.cpp')
-rw-r--r--searchcore/src/tests/proton/attribute/attribute_usage_filter/attribute_usage_filter_test.cpp18
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);