summaryrefslogtreecommitdiffstats
path: root/searchcore/src/tests/proton/documentdb/combiningfeedview
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2020-04-08 22:35:52 +0000
committerHenning Baldersheim <balder@yahoo-inc.com>2020-04-08 22:35:52 +0000
commitb971dbe48ad2111f24e7b953eaf351e9a0bb4ea1 (patch)
treed300b3d83395c6e89d395f00a7d34a772b616aee /searchcore/src/tests/proton/documentdb/combiningfeedview
parent78298d9906f214fc9e096df782bfb7ee5fa1e76d (diff)
Make RemoveOperation an interface and move implmentation to RemoveOperationWithDocId
Diffstat (limited to 'searchcore/src/tests/proton/documentdb/combiningfeedview')
-rw-r--r--searchcore/src/tests/proton/documentdb/combiningfeedview/combiningfeedview_test.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/searchcore/src/tests/proton/documentdb/combiningfeedview/combiningfeedview_test.cpp b/searchcore/src/tests/proton/documentdb/combiningfeedview/combiningfeedview_test.cpp
index 958be6a4686..fd8ce978d43 100644
--- a/searchcore/src/tests/proton/documentdb/combiningfeedview/combiningfeedview_test.cpp
+++ b/searchcore/src/tests/proton/documentdb/combiningfeedview/combiningfeedview_test.cpp
@@ -155,9 +155,9 @@ struct Fixture
const test::Document &doc = userDocs().getDocs(userId)[0];
return PutOperation(doc.getBucket(), doc.getTimestamp(), doc.getDoc());
}
- RemoveOperation remove(uint32_t userId) {
+ RemoveOperationWithDocId remove(uint32_t userId) {
const test::Document &doc = userDocs().getDocs(userId)[0];
- return RemoveOperation(doc.getBucket(), doc.getTimestamp(), doc.getDoc()->getId());
+ return RemoveOperationWithDocId(doc.getBucket(), doc.getTimestamp(), doc.getDoc()->getId());
}
UpdateOperation update(uint32_t userId) {
const test::Document &doc = userDocs().getDocs(userId)[0];
@@ -234,7 +234,7 @@ TEST_F("require that handlePut() sends to 2 feed views", Fixture)
TEST_F("require that prepareRemove() sends to removed view", Fixture)
{
- RemoveOperation op = f.remove(1);
+ RemoveOperationWithDocId op = f.remove(1);
f._view.prepareRemove(op);
EXPECT_EQUAL(0u, f._ready._view->_prepareRemove);
EXPECT_EQUAL(1u, f._removed._view->_prepareRemove);
@@ -246,7 +246,7 @@ TEST_F("require that prepareRemove() sends to removed view", Fixture)
TEST_F("require that prepareRemove() can fill previous dbdId", Fixture)
{
f._ready.insertDocs(f.userDocs(1));
- RemoveOperation op = f.remove(1);
+ RemoveOperationWithDocId op = f.remove(1);
f._view.prepareRemove(op);
EXPECT_EQUAL(1u, op.getPrevLid());
EXPECT_EQUAL(READY, op.getPrevSubDbId());
@@ -257,7 +257,7 @@ TEST_F("require that prepareRemove() can fill previous dbdId", Fixture)
TEST_F("require that handleRemove() sends op with valid dbdId to 1 feed view", Fixture)
{
- RemoveOperation op = f.remove(1);
+ RemoveOperationWithDocId op = f.remove(1);
op.setDbDocumentId(DbDocumentId(REMOVED, 1));
f._view.handleRemove(FeedToken(), op);
EXPECT_EQUAL(0u, f._ready._view->_handleRemove);
@@ -268,7 +268,7 @@ TEST_F("require that handleRemove() sends op with valid dbdId to 1 feed view", F
TEST_F("require that handleRemove() sends op with valid dbdId to 2 feed views", Fixture)
{
- RemoveOperation op = f.remove(1);
+ RemoveOperationWithDocId op = f.remove(1);
op.setDbDocumentId(DbDocumentId(REMOVED, 1));
op.setPrevDbDocumentId(DbDocumentId(READY, 1));
f._view.handleRemove(FeedToken(), op);
@@ -280,7 +280,7 @@ TEST_F("require that handleRemove() sends op with valid dbdId to 2 feed views",
TEST_F("require that handleRemove() sends op with invalid dbdId to prev view", Fixture)
{
- RemoveOperation op = f.remove(1);
+ RemoveOperationWithDocId op = f.remove(1);
// can be used in the case where removed feed view does not remember removes.
op.setPrevDbDocumentId(DbDocumentId(READY, 1));
f._view.handleRemove(FeedToken(), op);