aboutsummaryrefslogtreecommitdiffstats
path: root/searchcore/src/tests/proton/documentdb/buckethandler/buckethandler_test.cpp
diff options
context:
space:
mode:
authorTor Egge <Tor.Egge@yahoo-inc.com>2017-03-07 11:59:01 +0000
committerTor Egge <Tor.Egge@yahoo-inc.com>2017-03-07 11:59:01 +0000
commit2571ff10ae80941b131535c8f27a39c0dc2ade26 (patch)
tree75ef91095a642d9020957294734930cea99e9118 /searchcore/src/tests/proton/documentdb/buckethandler/buckethandler_test.cpp
parent2f88a749a2032f3e8024bca9c3261da03396cc30 (diff)
Track document sizes in bucket db.
Extend document meta store save/load to handle document sizes.
Diffstat (limited to 'searchcore/src/tests/proton/documentdb/buckethandler/buckethandler_test.cpp')
-rw-r--r--searchcore/src/tests/proton/documentdb/buckethandler/buckethandler_test.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/searchcore/src/tests/proton/documentdb/buckethandler/buckethandler_test.cpp b/searchcore/src/tests/proton/documentdb/buckethandler/buckethandler_test.cpp
index ba7c17f1c8d..03690ead45a 100644
--- a/searchcore/src/tests/proton/documentdb/buckethandler/buckethandler_test.cpp
+++ b/searchcore/src/tests/proton/documentdb/buckethandler/buckethandler_test.cpp
@@ -22,6 +22,7 @@ const PartitionId PART_ID(0);
const GlobalId GID_1("111111111111");
const BucketId BUCKET_1(8, GID_1.convertToBucketId().getRawId());
const Timestamp TIME_1(1u);
+const uint32_t DOCSIZE_1(4096u);
struct MySubDb
{
@@ -182,9 +183,9 @@ TEST_F("require that handleGetBucketInfo() can get cached bucket", Fixture)
{
{
BucketDBOwner::Guard db = f._bucketDB->takeGuard();
- db->add(GID_1, BUCKET_1, TIME_1, SubDbType::READY);
+ db->add(GID_1, BUCKET_1, TIME_1, DOCSIZE_1, SubDbType::READY);
db->cacheBucket(BUCKET_1);
- db->add(GID_1, BUCKET_1, TIME_1, SubDbType::NOTREADY);
+ db->add(GID_1, BUCKET_1, TIME_1, DOCSIZE_1, SubDbType::NOTREADY);
}
f.handleGetBucketInfo(BUCKET_1);
EXPECT_TRUE(expectEqual(1, 1, f._bucketInfo.getInfo()));
@@ -196,8 +197,8 @@ TEST_F("require that handleGetBucketInfo() can get cached bucket", Fixture)
{
// Must ensure empty bucket db before destruction.
BucketDBOwner::Guard db = f._bucketDB->takeGuard();
- db->remove(GID_1, BUCKET_1, TIME_1, SubDbType::READY);
- db->remove(GID_1, BUCKET_1, TIME_1, SubDbType::NOTREADY);
+ db->remove(GID_1, BUCKET_1, TIME_1, DOCSIZE_1, SubDbType::READY);
+ db->remove(GID_1, BUCKET_1, TIME_1, DOCSIZE_1, SubDbType::NOTREADY);
}
}