diff options
author | Tor Egge <Tor.Egge@online.no> | 2022-09-07 15:08:55 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-07 15:08:55 +0200 |
commit | a9d670dff75d1f1d3b9849ee60e312717ca570fe (patch) | |
tree | ae49c288efb2e70d20783c91c293aad5b7442968 /searchcore/src/tests/proton/documentdb | |
parent | 9ebb7848b51f05209ab735e05d115c55d08ade1a (diff) |
Revert "Unify access to assets needed during rank-setup."
Diffstat (limited to 'searchcore/src/tests/proton/documentdb')
3 files changed, 11 insertions, 12 deletions
diff --git a/searchcore/src/tests/proton/documentdb/configurer/configurer_test.cpp b/searchcore/src/tests/proton/documentdb/configurer/configurer_test.cpp index 53ea1b3542f..8bd1168d9af 100644 --- a/searchcore/src/tests/proton/documentdb/configurer/configurer_test.cpp +++ b/searchcore/src/tests/proton/documentdb/configurer/configurer_test.cpp @@ -152,7 +152,7 @@ struct Fixture vespalib::TestClock _clock; matching::QueryLimiter _queryLimiter; EmptyConstantValueFactory _constantValueFactory; - RankingAssetsRepo _constantValueRepo; + ConstantValueRepo _constantValueRepo; vespalib::ThreadStackExecutor _summaryExecutor; std::shared_ptr<PendingLidTrackerBase> _pendingLidsForCommit; ViewSet _views; diff --git a/searchcore/src/tests/proton/documentdb/documentdbconfig/documentdbconfig_test.cpp b/searchcore/src/tests/proton/documentdb/documentdbconfig/documentdbconfig_test.cpp index c2d3da1b4f6..c3b117f300a 100644 --- a/searchcore/src/tests/proton/documentdb/documentdbconfig/documentdbconfig_test.cpp +++ b/searchcore/src/tests/proton/documentdb/documentdbconfig/documentdbconfig_test.cpp @@ -7,6 +7,7 @@ #include <vespa/searchcore/proton/test/documentdb_config_builder.h> #include <vespa/vespalib/testkit/testapp.h> #include <vespa/config-summary.h> +#include <vespa/document/config/documenttypes_config_fwd.h> #include <vespa/document/repo/configbuilder.h> #include <vespa/document/repo/documenttyperepo.h> #include <vespa/document/datatype/datatype.h> @@ -71,13 +72,13 @@ public: return *this; } MyConfigBuilder &addRankingExpression() { - _builder.rankingExpressions(make_shared<RankingExpressions>(std::move(RankingExpressions().add("my_expr", "my_file")))); + auto expr_list = RankingExpressions().add("my_expr", "my_file"); + _builder.rankingExpressions(make_shared<RankingExpressions>(expr_list)); return *this; } MyConfigBuilder &addOnnxModel() { - OnnxModels::Vector models; - models.emplace_back("my_model_name", "my_model_file"); - _builder.onnxModels(make_shared<OnnxModels>(std::move(models))); + OnnxModels::Vector models = {{"my_model_name", "my_model_file"}}; + _builder.onnxModels(make_shared<OnnxModels>(models)); return *this; } MyConfigBuilder &addImportedField() { @@ -168,7 +169,7 @@ struct DelayAttributeAspectFixture { Schema::SP schema; ConfigSP attrCfg; ConfigSP noAttrCfg; - explicit DelayAttributeAspectFixture(bool hasDocField) + DelayAttributeAspectFixture(bool hasDocField) : schema(make_shared<Schema>()), attrCfg(), noAttrCfg() diff --git a/searchcore/src/tests/proton/documentdb/fileconfigmanager/fileconfigmanager_test.cpp b/searchcore/src/tests/proton/documentdb/fileconfigmanager/fileconfigmanager_test.cpp index e1ec5916291..ce66e99d2fc 100644 --- a/searchcore/src/tests/proton/documentdb/fileconfigmanager/fileconfigmanager_test.cpp +++ b/searchcore/src/tests/proton/documentdb/fileconfigmanager/fileconfigmanager_test.cpp @@ -113,13 +113,11 @@ addConfigsThatAreNotSavedToDisk(const DocumentDBConfig &cfg) RankingConstants::Vector constants = {{"my_name", "my_type", "my_path"}}; builder.rankingConstants(std::make_shared<RankingConstants>(constants)); - auto expr_list = std::make_shared<RankingExpressions>(); - expr_list->add("my_expr", "my_file"); - builder.rankingExpressions(expr_list); + auto expr_list = RankingExpressions().add("my_expr", "my_file"); + builder.rankingExpressions(std::make_shared<RankingExpressions>(expr_list)); - OnnxModels::Vector models; - models.emplace_back("my_model_name", "my_model_file"); - builder.onnxModels(std::make_shared<OnnxModels>(std::move(models))); + OnnxModels::Vector models = {{"my_model_name", "my_model_file"}}; + builder.onnxModels(std::make_shared<OnnxModels>(models)); ImportedFieldsConfigBuilder importedFields; importedFields.attribute.resize(1); |