diff options
Diffstat (limited to 'storage/src/tests/persistence')
3 files changed, 9 insertions, 17 deletions
diff --git a/storage/src/tests/persistence/filestorage/filestormanagertest.cpp b/storage/src/tests/persistence/filestorage/filestormanagertest.cpp index bf0083311fb..3407b77d698 100644 --- a/storage/src/tests/persistence/filestorage/filestormanagertest.cpp +++ b/storage/src/tests/persistence/filestorage/filestormanagertest.cpp @@ -1245,8 +1245,7 @@ createIterator(DummyStorageLink& link, const document::BucketId& bucketId, const std::string& docSel, framework::MicroSecTime fromTime = framework::MicroSecTime(0), - framework::MicroSecTime toTime = framework::MicroSecTime::max(), - bool headerOnly = false) + framework::MicroSecTime toTime = framework::MicroSecTime::max()) { spi::Bucket bucket(makeSpiBucket(bucketId)); @@ -1256,7 +1255,7 @@ createIterator(DummyStorageLink& link, selection.setToTimestamp(spi::Timestamp(toTime.getTime())); auto createIterCmd = std::make_shared<CreateIteratorCommand>( makeDocumentBucket(bucket), selection, - headerOnly ? "[header]" : "[all]", + "[all]", spi::NEWEST_DOCUMENT_ONLY); link.sendDown(createIterCmd); link.waitForMessages(1, FileStorManagerTest::LONG_WAITTIME); @@ -1358,7 +1357,7 @@ TEST_F(FileStorManagerTest, visiting) { } EXPECT_EQ(27u, totalDocs); } - // Visit bucket with min and max timestamps set, headers only + // Visit bucket with min and max timestamps set { document::BucketId bucket(16, 2); spi::IteratorId iterId( @@ -1366,8 +1365,7 @@ TEST_F(FileStorManagerTest, visiting) { ids[1], "", framework::MicroSecTime(30), - framework::MicroSecTime(40), - true)); + framework::MicroSecTime(40))); uint32_t totalDocs = 0; while (true) { auto cmd = std::make_shared<GetIterCommand>(makeDocumentBucket(ids[1]), iterId, 16*1024); diff --git a/storage/src/tests/persistence/persistencetestutils.cpp b/storage/src/tests/persistence/persistencetestutils.cpp index cf8bf71708d..504767e68c7 100644 --- a/storage/src/tests/persistence/persistencetestutils.cpp +++ b/storage/src/tests/persistence/persistencetestutils.cpp @@ -219,15 +219,11 @@ spi::GetResult PersistenceTestUtils::doGetOnDisk( uint16_t disk, const document::BucketId& bucketId, - const document::DocumentId& docId, - bool headerOnly) + const document::DocumentId& docId) { - document::FieldSet::UP fieldSet(new document::AllFields()); + auto fieldSet = std::make_unique<document::AllFields>(); spi::Context context(defaultLoadType, spi::Priority(0), spi::Trace::TraceLevel(0)); - if (headerOnly) { - fieldSet.reset(new document::HeaderFields()); - } return getPersistenceProvider().get(makeSpiBucket( bucketId, spi::PartitionId(disk)), *fieldSet, docId, context); } diff --git a/storage/src/tests/persistence/persistencetestutils.h b/storage/src/tests/persistence/persistencetestutils.h index cdd08d42565..6cee3b79ab8 100644 --- a/storage/src/tests/persistence/persistencetestutils.h +++ b/storage/src/tests/persistence/persistencetestutils.h @@ -190,14 +190,12 @@ public: spi::GetResult doGetOnDisk( uint16_t disk, const document::BucketId& bucketId, - const document::DocumentId& docId, - bool headerOnly); + const document::DocumentId& docId); spi::GetResult doGet( const document::BucketId& bucketId, - const document::DocumentId& docId, - bool headerOnly) - { return doGetOnDisk(0, bucketId, docId, headerOnly); } + const document::DocumentId& docId) + { return doGetOnDisk(0, bucketId, docId); } std::shared_ptr<document::DocumentUpdate> createBodyUpdate( const document::DocumentId& id, |