diff options
Diffstat (limited to 'searchcore/src/tests')
-rw-r--r-- | searchcore/src/tests/proton/documentdb/documentdbconfig/documentdbconfig_test.cpp | 13 | ||||
-rw-r--r-- | searchcore/src/tests/proton/proton_configurer/proton_configurer_test.cpp | 8 |
2 files changed, 10 insertions, 11 deletions
diff --git a/searchcore/src/tests/proton/documentdb/documentdbconfig/documentdbconfig_test.cpp b/searchcore/src/tests/proton/documentdb/documentdbconfig/documentdbconfig_test.cpp index c2d3da1b4f6..f1d6a384e9c 100644 --- a/searchcore/src/tests/proton/documentdb/documentdbconfig/documentdbconfig_test.cpp +++ b/searchcore/src/tests/proton/documentdb/documentdbconfig/documentdbconfig_test.cpp @@ -123,22 +123,27 @@ public: }; struct Fixture { - Schema::SP schema; + std::shared_ptr<Schema> basic_schema; + std::shared_ptr<Schema> full_schema; std::shared_ptr<const DocumentTypeRepo> repo; ConfigSP basicCfg; ConfigSP fullCfg; ConfigSP replayCfg; ConfigSP nullCfg; Fixture() - : schema(make_shared<Schema>()), + : basic_schema(make_shared<Schema>()), + full_schema(make_shared<Schema>()), repo(make_shared<DocumentTypeRepo>()), basicCfg(), fullCfg(), replayCfg(), nullCfg() { - basicCfg = MyConfigBuilder(4, schema, repo).addAttribute().addSummary(false, false).build(); - fullCfg = MyConfigBuilder(4, schema, repo).addAttribute(). + basic_schema->addAttributeField(Schema::AttributeField("my_attribute", schema::DataType::INT32)); + full_schema->addAttributeField(Schema::AttributeField("my_attribute", schema::DataType::INT32)); + full_schema->addSummaryField(Schema::SummaryField("my_attribute", schema::DataType::INT32)); + basicCfg = MyConfigBuilder(4, basic_schema, repo).addAttribute().addSummary(false, false).build(); + fullCfg = MyConfigBuilder(4, full_schema, repo).addAttribute(). addRankProfile(). addRankingConstant(). addRankingExpression(). diff --git a/searchcore/src/tests/proton/proton_configurer/proton_configurer_test.cpp b/searchcore/src/tests/proton/proton_configurer/proton_configurer_test.cpp index 48ff1dac93a..b9278c41d1d 100644 --- a/searchcore/src/tests/proton/proton_configurer/proton_configurer_test.cpp +++ b/searchcore/src/tests/proton/proton_configurer/proton_configurer_test.cpp @@ -20,7 +20,6 @@ #include <vespa/searchcore/proton/server/i_proton_disk_layout.h> #include <vespa/searchcore/proton/server/threading_service_config.h> #include <vespa/searchsummary/config/config-juniperrc.h> -#include <vespa/searchcommon/common/schemaconfigurer.h> #include <vespa/vespalib/util/size_literals.h> #include <vespa/vespalib/util/threadstackexecutor.h> #include <vespa/vespalib/test/insertion_operators.h> @@ -42,7 +41,6 @@ using document::DocumentTypeRepo; using search::TuneFileDocumentDB; using std::map; using search::index::Schema; -using search::index::SchemaBuilder; using proton::matching::RankingConstants; using proton::matching::RankingExpressions; using proton::matching::OnnxModels; @@ -58,11 +56,7 @@ struct DBConfigFixture { Schema::SP buildSchema() { - Schema::SP schema(std::make_shared<Schema>()); - SchemaBuilder::build(_attributesBuilder, *schema); - SchemaBuilder::build(_summaryBuilder, *schema); - SchemaBuilder::build(_indexschemaBuilder, *schema); - return schema; + return DocumentDBConfig::build_schema(_attributesBuilder, _summaryBuilder, _indexschemaBuilder); } static RankingConstants::SP buildRankingConstants() |