aboutsummaryrefslogtreecommitdiffstats
path: root/searchcore/src/tests/proton/index
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2021-11-26 09:00:38 +0000
committerHenning Baldersheim <balder@yahoo-inc.com>2021-11-26 10:05:48 +0000
commit1746d4a66d9696da6ae323c4532cbae4d5117498 (patch)
tree6020b5df907f4f68f35ea048581a7344eef58c9f /searchcore/src/tests/proton/index
parent1a9d505710061196383e649f0918cca7cd41a066 (diff)
Avoid requiring a syncable executor for warmup.
Diffstat (limited to 'searchcore/src/tests/proton/index')
-rw-r--r--searchcore/src/tests/proton/index/indexcollection_test.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/searchcore/src/tests/proton/index/indexcollection_test.cpp b/searchcore/src/tests/proton/index/indexcollection_test.cpp
index 07fbacde49a..70141f057bf 100644
--- a/searchcore/src/tests/proton/index/indexcollection_test.cpp
+++ b/searchcore/src/tests/proton/index/indexcollection_test.cpp
@@ -25,7 +25,7 @@ public:
MockIndexSearchable()
: _field_length_info()
{}
- MockIndexSearchable(const FieldLengthInfo& field_length_info)
+ explicit MockIndexSearchable(const FieldLengthInfo& field_length_info)
: _field_length_info(field_length_info)
{}
FieldLengthInfo get_field_length_info(const vespalib::string& field_name) const override {
@@ -79,17 +79,17 @@ public:
return std::make_unique<WarmupIndexCollection>(WarmupConfig(1s, false), prev, next, *_warmup, _executor, *this);
}
- virtual void warmupDone(ISearchableIndexCollection::SP current) override {
+ void warmupDone(std::shared_ptr<WarmupIndexCollection> current) override {
(void) current;
}
IndexCollectionTest()
- : _selector(new FixedSourceSelector(0, "fs1")),
- _source1(new MockIndexSearchable({3, 5})),
- _source2(new MockIndexSearchable({7, 11})),
- _fusion_source(new FakeIndexSearchable),
+ : _selector(std::make_shared<FixedSourceSelector>(0, "fs1")),
+ _source1(std::make_shared<MockIndexSearchable>(FieldLengthInfo(3, 5))),
+ _source2(std::make_shared<MockIndexSearchable>(FieldLengthInfo(7, 11))),
+ _fusion_source(std::make_shared<FakeIndexSearchable>()),
_executor(1, 128_Ki),
- _warmup(new FakeIndexSearchable)
+ _warmup(std::make_shared<FakeIndexSearchable>())
{}
~IndexCollectionTest() = default;
};