aboutsummaryrefslogtreecommitdiffstats
path: root/storage/src/tests/distributor
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2022-03-27 14:05:51 +0000
committerHenning Baldersheim <balder@yahoo-inc.com>2022-03-27 14:05:51 +0000
commit3112b96dcd66e8aed0587d44288ca8e347cc31a2 (patch)
treed537c0d2135604a46feb767a7a7e1986f3813dfd /storage/src/tests/distributor
parentf1ca88107239ff1ba6bf0f7e142486352ffd90e4 (diff)
Avoid need to copy/clone FieldUpdate
Diffstat (limited to 'storage/src/tests/distributor')
-rw-r--r--storage/src/tests/distributor/externaloperationhandlertest.cpp3
-rw-r--r--storage/src/tests/distributor/twophaseupdateoperationtest.cpp4
2 files changed, 3 insertions, 4 deletions
diff --git a/storage/src/tests/distributor/externaloperationhandlertest.cpp b/storage/src/tests/distributor/externaloperationhandlertest.cpp
index 27855091257..5aa5845ac4c 100644
--- a/storage/src/tests/distributor/externaloperationhandlertest.cpp
+++ b/storage/src/tests/distributor/externaloperationhandlertest.cpp
@@ -7,7 +7,6 @@
#include <vespa/document/update/assignvalueupdate.h>
#include <vespa/document/update/documentupdate.h>
#include <vespa/document/fieldvalue/stringfieldvalue.h>
-#include <vespa/document/datatype/documenttype.h>
#include <vespa/storage/common/reindexing_constants.h>
#include <vespa/storage/distributor/top_level_distributor.h>
#include <vespa/storage/distributor/distributor_bucket_space.h>
@@ -597,7 +596,7 @@ TEST_F(ExternalOperationHandlerTest, non_trivial_updates_are_rejected_if_feed_is
const auto* doc_type = _testDocMan.getTypeRepo().getDocumentType("testdoctype1");
document::FieldUpdate upd(doc_type->getField("title"));
upd.addUpdate(document::AssignValueUpdate(document::StringFieldValue("new value")));
- cmd->getUpdate()->addUpdate(upd);
+ cmd->getUpdate()->addUpdate(std::move(upd));
ASSERT_NO_FATAL_FAILURE(start_operation_verify_rejected(std::move(cmd)));
EXPECT_EQ("ReturnCode(NO_SPACE, External feed is blocked due to resource exhaustion: full disk)",
diff --git a/storage/src/tests/distributor/twophaseupdateoperationtest.cpp b/storage/src/tests/distributor/twophaseupdateoperationtest.cpp
index fae2a3d0982..7a7e53a1d2c 100644
--- a/storage/src/tests/distributor/twophaseupdateoperationtest.cpp
+++ b/storage/src/tests/distributor/twophaseupdateoperationtest.cpp
@@ -297,7 +297,7 @@ TwoPhaseUpdateOperationTest::sendUpdate(const std::string& bucketState,
document::DocumentId("id:ns:" + _doc_type->getName() + "::1"));
document::FieldUpdate fup(_doc_type->getField("headerval"));
fup.addUpdate(ArithmeticValueUpdate(ArithmeticValueUpdate::Add, 10));
- update->addUpdate(fup);
+ update->addUpdate(std::move(fup));
} else {
// Create an update to a different doctype than the one returned as
// part of the Get. Just a sneaky way to force an eval error.
@@ -307,7 +307,7 @@ TwoPhaseUpdateOperationTest::sendUpdate(const std::string& bucketState,
document::DocumentId("id:ns:" + _doc_type->getName() + "::1"));
document::FieldUpdate fup(badDocType->getField("onlyinchild"));
fup.addUpdate(ArithmeticValueUpdate(ArithmeticValueUpdate::Add, 10));
- update->addUpdate(fup);
+ update->addUpdate(std::move(fup));
}
update->setCreateIfNonExistent(options._createIfNonExistent);