summaryrefslogtreecommitdiffstats
path: root/searchcore/src/tests/proton/attribute/imported_attributes_context/imported_attributes_context_test.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'searchcore/src/tests/proton/attribute/imported_attributes_context/imported_attributes_context_test.cpp')
-rw-r--r--searchcore/src/tests/proton/attribute/imported_attributes_context/imported_attributes_context_test.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/searchcore/src/tests/proton/attribute/imported_attributes_context/imported_attributes_context_test.cpp b/searchcore/src/tests/proton/attribute/imported_attributes_context/imported_attributes_context_test.cpp
index d95d79fbd11..afbaabd9fc3 100644
--- a/searchcore/src/tests/proton/attribute/imported_attributes_context/imported_attributes_context_test.cpp
+++ b/searchcore/src/tests/proton/attribute/imported_attributes_context/imported_attributes_context_test.cpp
@@ -8,6 +8,7 @@ LOG_SETUP("imported_attributes_context_test");
#include <vespa/searchlib/attribute/attribute.h>
#include <vespa/searchlib/attribute/attributefactory.h>
#include <vespa/searchlib/attribute/imported_attribute_vector.h>
+#include <vespa/searchlib/test/mock_gid_to_lid_mapping.h>
#include <future>
using namespace proton;
@@ -17,12 +18,15 @@ using search::attribute::Config;
using search::attribute::IAttributeVector;
using search::attribute::ImportedAttributeVector;
using search::attribute::ReferenceAttribute;
+using search::attribute::test::MockGidToLidMapperFactory;
using generation_t = AttributeVector::generation_t;
ReferenceAttribute::SP
createReferenceAttribute(const vespalib::string &name)
{
- return std::make_shared<ReferenceAttribute>(name, Config(BasicType::REFERENCE));
+ auto refAttr = std::make_shared<ReferenceAttribute>(name, Config(BasicType::REFERENCE));
+ refAttr->setGidToLidMapperFactory(std::make_shared<MockGidToLidMapperFactory>());
+ return refAttr;
}
AttributeVector::SP