diff options
author | Geir Storli <geirst@yahooinc.com> | 2023-03-13 13:55:29 +0000 |
---|---|---|
committer | Geir Storli <geirst@yahooinc.com> | 2023-03-13 13:59:08 +0000 |
commit | 0c657642eff7d85c000464e9edba16ded4845e7d (patch) | |
tree | 3315f420e49dd85739089780388007ce1649672a /searchcore/src/tests/proton/attribute | |
parent | a40183094fd45dbf320dd57f8d56a5a6fac7f247 (diff) |
Reduce creation of Document instances without DocumentTypeRepo.
Diffstat (limited to 'searchcore/src/tests/proton/attribute')
3 files changed, 3 insertions, 3 deletions
diff --git a/searchcore/src/tests/proton/attribute/attribute_populator/attribute_populator_test.cpp b/searchcore/src/tests/proton/attribute/attribute_populator/attribute_populator_test.cpp index 19b8348fb7a..b4d3eb13ac7 100644 --- a/searchcore/src/tests/proton/attribute/attribute_populator/attribute_populator_test.cpp +++ b/searchcore/src/tests/proton/attribute/attribute_populator/attribute_populator_test.cpp @@ -60,7 +60,7 @@ struct DocContext std::shared_ptr<Document> create(uint32_t id, int64_t fieldValue) { vespalib::string docId = vespalib::make_string("id:searchdocument:searchdocument::%u", id); - auto doc = std::make_shared<Document>(*_repo->getDocumentType("searchdocument"), DocumentId(docId)); + auto doc = std::make_shared<Document>(*_repo, *_repo->getDocumentType("searchdocument"), DocumentId(docId)); doc->setValue("a1", IntFieldValue(fieldValue)); return doc; } diff --git a/searchcore/src/tests/proton/attribute/attribute_test.cpp b/searchcore/src/tests/proton/attribute/attribute_test.cpp index 75d9c78d07e..4458cd66ad6 100644 --- a/searchcore/src/tests/proton/attribute/attribute_test.cpp +++ b/searchcore/src/tests/proton/attribute/attribute_test.cpp @@ -1050,7 +1050,7 @@ public: } std::unique_ptr<Document> makeDoc() { - return std::make_unique<Document>(_type, DocumentId("id::test::1")); + return Document::make_without_repo(_type, DocumentId("id::test::1")); } }; diff --git a/searchcore/src/tests/proton/attribute/document_field_extractor/document_field_extractor_test.cpp b/searchcore/src/tests/proton/attribute/document_field_extractor/document_field_extractor_test.cpp index 903b4d89696..42dad54394f 100644 --- a/searchcore/src/tests/proton/attribute/document_field_extractor/document_field_extractor_test.cpp +++ b/searchcore/src/tests/proton/attribute/document_field_extractor/document_field_extractor_test.cpp @@ -109,7 +109,7 @@ struct FixtureBase Document * makeDoc() { - doc = std::make_unique<Document>(type, DocumentId("id::test::1")); + doc = Document::make_without_repo(type, DocumentId("id::test::1")); extractor = std::make_unique<DocumentFieldExtractor>(*doc); return doc.get(); } |