summaryrefslogtreecommitdiffstats
path: root/storage/src/tests/distributor/externaloperationhandlertest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'storage/src/tests/distributor/externaloperationhandlertest.cpp')
-rw-r--r--storage/src/tests/distributor/externaloperationhandlertest.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/storage/src/tests/distributor/externaloperationhandlertest.cpp b/storage/src/tests/distributor/externaloperationhandlertest.cpp
index 27855091257..0e5372043ab 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>
@@ -22,6 +21,9 @@
using document::test::makeDocumentBucket;
using document::DocumentId;
+using document::FieldUpdate;
+using document::StringFieldValue;
+using document::AssignValueUpdate;
using namespace ::testing;
namespace storage::distributor {
@@ -595,9 +597,7 @@ TEST_F(ExternalOperationHandlerTest, non_trivial_updates_are_rejected_if_feed_is
auto cmd = makeUpdateCommand("testdoctype1", "id:foo:testdoctype1::foo");
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(FieldUpdate(doc_type->getField("title")).addUpdate(std::make_unique<AssignValueUpdate>(StringFieldValue("new value"))));
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)",