summaryrefslogtreecommitdiffstats
path: root/searchcore/src/tests/proton/documentdb/lid_space_compaction
diff options
context:
space:
mode:
authorGeir Storli <geirst@verizonmedia.com>2021-05-14 21:38:55 +0200
committerGitHub <noreply@github.com>2021-05-14 21:38:55 +0200
commit69435eba0f94edff7e1f03e3efd0656d00b9f287 (patch)
treed83c3510fff85eb9be9f5ab1f3ca279a20d13a95 /searchcore/src/tests/proton/documentdb/lid_space_compaction
parent202da99a968c4d55abb6fd44f07478d6a4b80ed4 (diff)
Revert "Revert "Revert "Revert "Revert "Now that everything is controlled bucketwise by the bucket db we shou…"""""
Diffstat (limited to 'searchcore/src/tests/proton/documentdb/lid_space_compaction')
-rw-r--r--searchcore/src/tests/proton/documentdb/lid_space_compaction/lid_space_handler_test.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/searchcore/src/tests/proton/documentdb/lid_space_compaction/lid_space_handler_test.cpp b/searchcore/src/tests/proton/documentdb/lid_space_compaction/lid_space_handler_test.cpp
index 369d4f85c73..2ca1101ac3a 100644
--- a/searchcore/src/tests/proton/documentdb/lid_space_compaction/lid_space_handler_test.cpp
+++ b/searchcore/src/tests/proton/documentdb/lid_space_compaction/lid_space_handler_test.cpp
@@ -38,6 +38,13 @@ TEST_F(HandlerTest, createMoveOperation_works_as_expected)
const BucketId bucketId(100);
const Timestamp timestamp(200);
DocumentMetaData document(moveFromLid, timestamp, bucketId, GlobalId());
+ {
+ EXPECT_FALSE(_subDb.maintenance_sub_db.lidNeedsCommit(moveFromLid));
+ IPendingLidTracker::Token token = _subDb._pendingLidsForCommit.produce(moveFromLid);
+ EXPECT_TRUE(_subDb.maintenance_sub_db.lidNeedsCommit(moveFromLid));
+ MoveOperation::UP op = _handler.createMoveOperation(document, moveToLid);
+ ASSERT_FALSE(op);
+ }
EXPECT_FALSE(_subDb.maintenance_sub_db.lidNeedsCommit(moveFromLid));
MoveOperation::UP op = _handler.createMoveOperation(document, moveToLid);
ASSERT_TRUE(op);