aboutsummaryrefslogtreecommitdiffstats
path: root/storage/src/tests/distributor/putoperationtest.cpp
diff options
context:
space:
mode:
authorTor Brede Vekterli <vekterli@yahooinc.com>2023-08-21 13:37:14 +0000
committerTor Brede Vekterli <vekterli@yahooinc.com>2023-08-21 13:37:14 +0000
commitb045c3f2fa147e1c551bc46a8266afe3204fa788 (patch)
tree9dbe633a0cca8c78972e86f7acf8ec68f76656de /storage/src/tests/distributor/putoperationtest.cpp
parent0f9f11da84db6a2ec1190758c3e60d6861c23438 (diff)
Make partial cancellelation state part of the API
Also rename factory function to avoid explicit coupling to higher level semantics.
Diffstat (limited to 'storage/src/tests/distributor/putoperationtest.cpp')
-rw-r--r--storage/src/tests/distributor/putoperationtest.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/storage/src/tests/distributor/putoperationtest.cpp b/storage/src/tests/distributor/putoperationtest.cpp
index 431b7595571..ee87fe84df6 100644
--- a/storage/src/tests/distributor/putoperationtest.cpp
+++ b/storage/src/tests/distributor/putoperationtest.cpp
@@ -217,7 +217,7 @@ TEST_F(PutOperationTest, failed_CreateBucket_does_not_send_RequestBucketInfo_if_
ASSERT_EQ("Create bucket => 1,Create bucket => 0,Put => 1,Put => 0", _sender.getCommands(true));
- op->cancel(_sender, CancelScope::of_ownership_change());
+ op->cancel(_sender, CancelScope::of_fully_cancelled());
sendReply(0, api::ReturnCode::TIMEOUT, api::BucketInfo()); // CreateBucket to node 1
// DB is not touched (note: normally node 1 would be removed at the cancel-edge).
@@ -320,7 +320,7 @@ TEST_F(PutOperationTest, return_success_if_op_acked_on_all_replicas_even_if_oper
"id:test:testdoctype1::, timestamp 100, size 45) => 1",
_sender.getCommands(true, true));
- op->cancel(_sender, CancelScope::of_ownership_change());
+ op->cancel(_sender, CancelScope::of_fully_cancelled());
sendReply(0);
sendReply(1);
@@ -659,7 +659,7 @@ TEST_F(PutOperationTest, db_not_updated_if_operation_cancelled_by_ownership_chan
ASSERT_EQ("Put => 1,Put => 2,Put => 0", _sender.getCommands(true));
operation_context().remove_nodes_from_bucket_database(makeDocumentBucket(bucket), {0, 1, 2});
- op->cancel(_sender, CancelScope::of_ownership_change());
+ op->cancel(_sender, CancelScope::of_fully_cancelled());
// Normally DB updates triggered by replies don't _create_ buckets in the DB, unless
// they're remapped buckets. Use a remapping to ensure we hit a create-if-missing DB path.
@@ -886,7 +886,7 @@ TEST_F(PutOperationTest, ownership_cancellation_during_condition_probe_fails_ope
ASSERT_NO_FATAL_FAILURE(set_up_tas_put_with_2_inconsistent_replica_nodes());
op->receive(_sender, make_get_reply(*sent_get_command(0), 0, false, false));
- op->cancel(_sender, CancelScope::of_ownership_change());
+ op->cancel(_sender, CancelScope::of_fully_cancelled());
op->receive(_sender, make_get_reply(*sent_get_command(1), 0, false, false));
ASSERT_EQ("Get => 1,Get => 0", _sender.getCommands(true));