summaryrefslogtreecommitdiffstats
path: root/storage/src/tests/distributor/twophaseupdateoperationtest.cpp
diff options
context:
space:
mode:
authorTor Brede Vekterli <vekterli@oath.com>2018-11-19 13:50:02 +0000
committerTor Brede Vekterli <vekterli@oath.com>2018-11-19 13:50:57 +0000
commit12b590416c164ef763896f2ce3f7e7f6ce600183 (patch)
tree66fed959caa741faf50ed543905d6f72072e85fe /storage/src/tests/distributor/twophaseupdateoperationtest.cpp
parent5a591f4c70ae2ec28a3bc32e32434ccd36694b40 (diff)
Add explicit metric for diverging timestamps on updated documents
Easier to track across nodes than hunting for log warnings.
Diffstat (limited to 'storage/src/tests/distributor/twophaseupdateoperationtest.cpp')
-rw-r--r--storage/src/tests/distributor/twophaseupdateoperationtest.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/storage/src/tests/distributor/twophaseupdateoperationtest.cpp b/storage/src/tests/distributor/twophaseupdateoperationtest.cpp
index f4b80f7961c..3c82931467e 100644
--- a/storage/src/tests/distributor/twophaseupdateoperationtest.cpp
+++ b/storage/src/tests/distributor/twophaseupdateoperationtest.cpp
@@ -204,7 +204,7 @@ TwoPhaseUpdateOperationTest::replyToMessage(
api::ReturnCode::Result result)
{
std::shared_ptr<api::StorageMessage> msg2 = sender.commands.at(index);
- UpdateCommand& updatec = dynamic_cast<UpdateCommand&>(*msg2);
+ auto& updatec = dynamic_cast<UpdateCommand&>(*msg2);
std::unique_ptr<api::StorageReply> reply(updatec.makeReply());
static_cast<api::UpdateReply*>(reply.get())->setOldTimestamp(oldTimestamp);
reply->setResult(api::ReturnCode(result, ""));
@@ -222,7 +222,7 @@ TwoPhaseUpdateOperationTest::replyToPut(
const std::string& traceMsg)
{
std::shared_ptr<api::StorageMessage> msg2 = sender.commands.at(index);
- PutCommand& putc = dynamic_cast<PutCommand&>(*msg2);
+ auto& putc = dynamic_cast<PutCommand&>(*msg2);
std::unique_ptr<api::StorageReply> reply(putc.makeReply());
reply->setResult(api::ReturnCode(result, ""));
if (!traceMsg.empty()) {
@@ -240,7 +240,7 @@ TwoPhaseUpdateOperationTest::replyToCreateBucket(
api::ReturnCode::Result result)
{
std::shared_ptr<api::StorageMessage> msg2 = sender.commands.at(index);
- CreateBucketCommand& putc = dynamic_cast<CreateBucketCommand&>(*msg2);
+ auto& putc = dynamic_cast<CreateBucketCommand&>(*msg2);
std::unique_ptr<api::StorageReply> reply(putc.makeReply());
reply->setResult(api::ReturnCode(result, ""));
callback.receive(sender,
@@ -257,8 +257,7 @@ TwoPhaseUpdateOperationTest::replyToGet(
api::ReturnCode::Result result,
const std::string& traceMsg)
{
- const api::GetCommand& get(
- static_cast<const api::GetCommand&>(*sender.commands.at(index)));
+ auto& get = static_cast<const api::GetCommand&>(*sender.commands.at(index));
std::shared_ptr<api::StorageReply> reply;
if (haveDocument) {