aboutsummaryrefslogtreecommitdiffstats
path: root/searchcore/src/tests/proton/index/fusionrunner_test.cpp
diff options
context:
space:
mode:
authorGeir Storli <geirst@verizonmedia.com>2019-06-06 11:50:01 +0000
committerGeir Storli <geirst@verizonmedia.com>2019-06-06 12:31:24 +0000
commitbc3e355ded5f6403607c0e1b15fe5543d68c093e (patch)
tree7d96c2d76038399eac80305869db98ccb8f43d4a /searchcore/src/tests/proton/index/fusionrunner_test.cpp
parent7b629efc2f963558e663615bc5e63d7d59624cae (diff)
Extend MemoryIndex to take an instance of IFieldLengthInspector to setup field length calculators per field index.
Diffstat (limited to 'searchcore/src/tests/proton/index/fusionrunner_test.cpp')
-rw-r--r--searchcore/src/tests/proton/index/fusionrunner_test.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/searchcore/src/tests/proton/index/fusionrunner_test.cpp b/searchcore/src/tests/proton/index/fusionrunner_test.cpp
index 8f9944e178e..25e7a4ffa6b 100644
--- a/searchcore/src/tests/proton/index/fusionrunner_test.cpp
+++ b/searchcore/src/tests/proton/index/fusionrunner_test.cpp
@@ -1,19 +1,19 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-// Unit tests for fusionrunner.
+#include <vespa/fastos/file.h>
#include <vespa/searchcore/proton/index/indexmanager.h>
#include <vespa/searchcore/proton/server/executorthreadingservice.h>
#include <vespa/searchcorespi/index/fusionrunner.h>
-#include <vespa/searchlib/memoryindex/memory_index.h>
+#include <vespa/searchlib/common/isequencedtaskexecutor.h>
#include <vespa/searchlib/diskindex/diskindex.h>
#include <vespa/searchlib/diskindex/indexbuilder.h>
#include <vespa/searchlib/fef/matchdatalayout.h>
#include <vespa/searchlib/index/docbuilder.h>
#include <vespa/searchlib/index/dummyfileheadercontext.h>
+#include <vespa/searchlib/memoryindex/memory_index.h>
#include <vespa/searchlib/query/tree/simplequery.h>
-#include <vespa/searchlib/common/isequencedtaskexecutor.h>
+#include <vespa/searchlib/test/index/mock_field_length_inspector.h>
#include <vespa/vespalib/testkit/testapp.h>
-#include <vespa/fastos/file.h>
#include <set>
using document::Document;
@@ -35,6 +35,7 @@ using search::index::DocBuilder;
using search::index::DummyFileHeaderContext;
using search::index::Schema;
using search::index::schema::DataType;
+using search::index::test::MockFieldLengthInspector;
using search::memoryindex::MemoryIndex;
using search::query::SimpleStringTerm;
using search::queryeval::Blueprint;
@@ -171,7 +172,8 @@ void Test::createIndex(const string &dir, uint32_t id, bool fusion) {
Schema schema = getSchema();
DocBuilder doc_builder(schema);
- MemoryIndex memory_index(schema, _threadingService.indexFieldInverter(),
+ MemoryIndex memory_index(schema, MockFieldLengthInspector(),
+ _threadingService.indexFieldInverter(),
_threadingService.indexFieldWriter());
addDocument(doc_builder, memory_index, *_selector, id, id + 0, term);
addDocument(doc_builder, memory_index, *_selector, id, id + 1, "bar");