diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2020-08-04 14:03:49 +0000 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2020-08-04 14:03:49 +0000 |
commit | db49d6d264873e7faf0e5df0a6dec42cc94888e8 (patch) | |
tree | d3a3df7f4d5f9c912489aa61d53efd9200e7ebed /storage/src/tests/distributor/twophaseupdateoperationtest.cpp | |
parent | bdc43e2dda007965b770cd0a778d6a2f2634d276 (diff) |
Use named constants instead of strings sprinkled all over.
Diffstat (limited to 'storage/src/tests/distributor/twophaseupdateoperationtest.cpp')
-rw-r--r-- | storage/src/tests/distributor/twophaseupdateoperationtest.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/storage/src/tests/distributor/twophaseupdateoperationtest.cpp b/storage/src/tests/distributor/twophaseupdateoperationtest.cpp index e42e7684f81..635e5b9883b 100644 --- a/storage/src/tests/distributor/twophaseupdateoperationtest.cpp +++ b/storage/src/tests/distributor/twophaseupdateoperationtest.cpp @@ -1,18 +1,16 @@ // Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include <vespa/config/helper/configgetter.h> -#include <vespa/document/config/config-documenttypes.h> #include <vespa/document/repo/documenttyperepo.h> #include <vespa/document/base/testdocrepo.h> #include <vespa/document/update/arithmeticvalueupdate.h> -#include <iomanip> -#include <tests/common/dummystoragelink.h> #include <vespa/storage/distributor/externaloperationhandler.h> #include <vespa/storageapi/message/persistence.h> #include <vespa/storage/distributor/operations/external/twophaseupdateoperation.h> #include <tests/distributor/distributortestutil.h> #include <vespa/document/test/make_document_bucket.h> #include <vespa/storage/distributor/distributor.h> +#include <vespa/document/fieldset/fieldsets.h> #include <vespa/vespalib/gtest/gtest.h> #include <gmock/gmock.h> @@ -1100,13 +1098,13 @@ TEST_F(ThreePhaseUpdateTest, metadata_only_gets_are_sent_if_3phase_update_enable ASSERT_EQ("Get => 0,Get => 1", _sender.getCommands(true)); { auto& get_cmd = dynamic_cast<const api::GetCommand&>(*_sender.command(0)); - EXPECT_EQ("[none]", get_cmd.getFieldSet()); + EXPECT_EQ(document::NoFields::NAME, get_cmd.getFieldSet()); EXPECT_EQ(get_cmd.internal_read_consistency(), api::InternalReadConsistency::Weak); checkMessageSettingsPropagatedTo(_sender.command(0)); } { auto& get_cmd = dynamic_cast<const api::GetCommand&>(*_sender.command(1)); - EXPECT_EQ("[none]", get_cmd.getFieldSet()); + EXPECT_EQ(document::NoFields::NAME, get_cmd.getFieldSet()); EXPECT_EQ(get_cmd.internal_read_consistency(), api::InternalReadConsistency::Weak); checkMessageSettingsPropagatedTo(_sender.command(1)); } @@ -1125,7 +1123,7 @@ TEST_F(ThreePhaseUpdateTest, full_document_get_sent_to_replica_with_highest_time ASSERT_EQ("Get => 1", _sender.getCommands(true, false, 2)); { auto& get_cmd = dynamic_cast<const api::GetCommand&>(*_sender.command(2)); - EXPECT_EQ("[all]", get_cmd.getFieldSet()); + EXPECT_EQ(document::AllFields::NAME, get_cmd.getFieldSet()); EXPECT_EQ(get_cmd.internal_read_consistency(), api::InternalReadConsistency::Strong); } } |