diff options
author | Tor Egge <Tor.Egge@online.no> | 2023-06-21 12:46:34 +0200 |
---|---|---|
committer | Tor Egge <Tor.Egge@online.no> | 2023-06-21 12:46:34 +0200 |
commit | 999b90346d4d7f359d072c328ca7ac895997852b (patch) | |
tree | 8e50abcf207edc66717d0ae1be37545c4fae1d64 /searchlib/src/tests/attribute/multi_value_mapping | |
parent | 9bcd67c4d50c0f5dc9df035a5c1c0ffbcc8f0c1c (diff) |
Cleanup multi value mapping unit test.
Diffstat (limited to 'searchlib/src/tests/attribute/multi_value_mapping')
-rw-r--r-- | searchlib/src/tests/attribute/multi_value_mapping/multi_value_mapping_test.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/searchlib/src/tests/attribute/multi_value_mapping/multi_value_mapping_test.cpp b/searchlib/src/tests/attribute/multi_value_mapping/multi_value_mapping_test.cpp index 17e852c8b92..4b01808e855 100644 --- a/searchlib/src/tests/attribute/multi_value_mapping/multi_value_mapping_test.cpp +++ b/searchlib/src/tests/attribute/multi_value_mapping/multi_value_mapping_test.cpp @@ -91,21 +91,21 @@ public: _maxSmallArraySize() { } - void setup(uint32_t maxSmallArraySize, bool enable_free_lists = true) { - ArrayStoreConfig config(maxSmallArraySize, + void setup(uint32_t max_array_store_type_id, bool enable_free_lists = true) { + ArrayStoreConfig config(max_array_store_type_id, ArrayStoreConfig::AllocSpec(0, RefType::offsetSize(), 8_Ki, ALLOC_GROW_FACTOR)); config.enable_free_lists(enable_free_lists); _mvMapping = std::make_unique<MvMapping>(config, vespalib::GrowStrategy(), std::make_unique<MemoryAllocatorObserver>(_stats)); _attr = std::make_unique<AttributeType>(*_mvMapping); - _maxSmallArraySize = maxSmallArraySize; + _maxSmallArraySize = _mvMapping->get_mapper().get_array_size(max_array_store_type_id); } - void setup(uint32_t maxSmallArraySize, size_t min_entries, size_t max_entries, size_t num_entries_for_new_buffer, bool enable_free_lists = true) { - ArrayStoreConfig config(maxSmallArraySize, + void setup(uint32_t max_array_store_type_id, size_t min_entries, size_t max_entries, size_t num_entries_for_new_buffer, bool enable_free_lists = true) { + ArrayStoreConfig config(max_array_store_type_id, ArrayStoreConfig::AllocSpec(min_entries, max_entries, num_entries_for_new_buffer, ALLOC_GROW_FACTOR)); config.enable_free_lists(enable_free_lists); _mvMapping = std::make_unique<MvMapping>(config, vespalib::GrowStrategy(), std::make_unique<MemoryAllocatorObserver>(_stats)); _attr = std::make_unique<AttributeType>(*_mvMapping); - _maxSmallArraySize = maxSmallArraySize; + _maxSmallArraySize = _mvMapping->get_mapper().get_array_size(max_array_store_type_id); } ~MappingTestBase() { } |