diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2022-09-29 11:58:36 +0000 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2022-09-29 11:58:36 +0000 |
commit | a69226e622838cea0021aa1762c5ac5cc0cdbdff (patch) | |
tree | 0dbb8d790726f6af1b4ada79a12fbfa5ef51771c /searchcore | |
parent | 7302ce45688748474129c0f0a50778818c1784eb (diff) |
Update tests.
Diffstat (limited to 'searchcore')
3 files changed, 7 insertions, 20 deletions
diff --git a/searchcore/src/tests/proton/documentdb/documentdbconfigscout/documentdbconfigscout_test.cpp b/searchcore/src/tests/proton/documentdb/documentdbconfigscout/documentdbconfigscout_test.cpp index b8579d66c5f..3a0ae8576ca 100644 --- a/searchcore/src/tests/proton/documentdb/documentdbconfigscout/documentdbconfigscout_test.cpp +++ b/searchcore/src/tests/proton/documentdb/documentdbconfigscout/documentdbconfigscout_test.cpp @@ -22,7 +22,7 @@ namespace DDBCSP getConfig(int64_t generation, const Schema::SP &schema, - shared_ptr<const DocumentTypeRepo> repo, + const shared_ptr<const DocumentTypeRepo> & repo, const AttributesConfig &attributes) { return test::DocumentDBConfigBuilder(generation, schema, "client", "test"). @@ -43,9 +43,6 @@ assertDefaultAttribute(const AttributesConfig::Attribute &attribute, if (!EXPECT_FALSE(attribute.paged)) { return false; } - if (!EXPECT_FALSE(attribute.enablebitvectors)) { - return false; - } if (!EXPECT_FALSE(attribute.enableonlybitvector)) { return false; } @@ -66,9 +63,6 @@ assertFastSearchAttribute(const AttributesConfig::Attribute &attribute, if (!EXPECT_FALSE(attribute.paged)) { return false; } - if (!EXPECT_FALSE(attribute.enablebitvectors)) { - return false; - } if (!EXPECT_FALSE(attribute.enableonlybitvector)) { return false; } @@ -89,9 +83,6 @@ assertFastSearchAndMoreAttribute(const AttributesConfig::Attribute &attribute, if (!EXPECT_TRUE(attribute.paged)) { return false; } - if (!EXPECT_TRUE(attribute.enablebitvectors)) { - return false; - } if (!EXPECT_TRUE(attribute.enableonlybitvector)) { return false; } @@ -208,7 +199,7 @@ assertScoutedAttributes(const AttributesConfig::AttributeVector &attributes) AttributesConfig::Attribute -setupDefaultAttribute(const vespalib::string name) +setupDefaultAttribute(const vespalib::string & name) { AttributesConfig::Attribute attribute; attribute.name = name; @@ -217,7 +208,7 @@ setupDefaultAttribute(const vespalib::string name) AttributesConfig::Attribute -setupFastSearchAttribute(const vespalib::string name) +setupFastSearchAttribute(const vespalib::string & name) { AttributesConfig::Attribute attribute; attribute.name = name; @@ -227,13 +218,12 @@ setupFastSearchAttribute(const vespalib::string name) AttributesConfig::Attribute -setupFastSearchAndMoreAttribute(const vespalib::string name) +setupFastSearchAndMoreAttribute(const vespalib::string & name) { AttributesConfig::Attribute attribute; attribute.name = name; attribute.fastsearch = true; attribute.paged = true; - attribute.enablebitvectors = true; attribute.enableonlybitvector = true; return attribute; } diff --git a/searchcore/src/vespa/searchcore/proton/attribute/attributesconfigscout.cpp b/searchcore/src/vespa/searchcore/proton/attribute/attributesconfigscout.cpp index e5a087e1bf2..b2bd81aaf9d 100644 --- a/searchcore/src/vespa/searchcore/proton/attribute/attributesconfigscout.cpp +++ b/searchcore/src/vespa/searchcore/proton/attribute/attributesconfigscout.cpp @@ -25,7 +25,6 @@ void AttributesConfigScout::adjust(AttributesConfig::Attribute &attr, const AttributesConfig::Attribute &liveAttr) { - attr.enablebitvectors = liveAttr.enablebitvectors; attr.enableonlybitvector = liveAttr.enableonlybitvector; attr.fastsearch = liveAttr.fastsearch; attr.paged = liveAttr.paged; @@ -43,8 +42,7 @@ AttributesConfigScout::adjust(AttributesConfig::Attribute &attr) const auto it = _map.find(attr.name); if (it != _map.end()) { const auto &liveAttr = _live.attribute[it->second]; - search::attribute::Config liveCfg = - ConfigConverter::convert(liveAttr); + search::attribute::Config liveCfg = ConfigConverter::convert(liveAttr); AttributeTypeMatcher matching_types; if (matching_types(cfg, liveCfg)) { adjust(attr, liveAttr); diff --git a/searchcore/src/vespa/searchcore/proton/attribute/attributesconfigscout.h b/searchcore/src/vespa/searchcore/proton/attribute/attributesconfigscout.h index a0db26273a5..9ffb2976a7a 100644 --- a/searchcore/src/vespa/searchcore/proton/attribute/attributesconfigscout.h +++ b/searchcore/src/vespa/searchcore/proton/attribute/attributesconfigscout.h @@ -4,8 +4,7 @@ #include <vespa/config-attributes.h> -namespace proton -{ +namespace proton { /** * Class to create adjusted attributes config that minimizes the number of @@ -32,7 +31,7 @@ private: adjust(AttributesConfig::Attribute &attr); public: - AttributesConfigScout(const AttributesConfig &live); + explicit AttributesConfigScout(const AttributesConfig &live); std::shared_ptr<AttributesConfig> adjust(const AttributesConfig &config); |