aboutsummaryrefslogtreecommitdiffstats
path: root/searchlib/src/tests/docstore/document_store
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@oath.com>2018-09-24 11:50:47 +0200
committerHenning Baldersheim <balder@oath.com>2018-09-24 11:50:47 +0200
commit85491d4ce0d186321e2c8a34f62ae13cadd6d5a4 (patch)
treef06b1f7ff8f82b657fe57df0eb433fc244602a74 /searchlib/src/tests/docstore/document_store
parent963ede37edb248accf9eba715d83eca45c8804b9 (diff)
Update comments and tests as memory size has increased by 8 bytes per entry in the cache.
Diffstat (limited to 'searchlib/src/tests/docstore/document_store')
-rw-r--r--searchlib/src/tests/docstore/document_store/document_store_test.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/searchlib/src/tests/docstore/document_store/document_store_test.cpp b/searchlib/src/tests/docstore/document_store/document_store_test.cpp
index 16acbdfe878..649fb675dca 100644
--- a/searchlib/src/tests/docstore/document_store/document_store_test.cpp
+++ b/searchlib/src/tests/docstore/document_store/document_store_test.cpp
@@ -102,8 +102,15 @@ void verifyValue(vespalib::stringref s, const Value & v) {
EXPECT_EQUAL(0, memcmp(s.data(), result.first.getData(), result.first.getDataLen()));
}
-TEST("require that Value can store uncompressed data") {
+TEST("require that Value and cache entries have expected size") {
+ using pair = std::pair<DocumentIdT, Value>;
+ using Node = vespalib::hash_node<pair>;
EXPECT_EQUAL(64ul, sizeof(Value));
+ EXPECT_EQUAL(72ul, sizeof(pair));
+ EXPECT_EQUAL(80ul, sizeof(Node));
+}
+
+TEST("require that Value can store uncompressed data") {
Value v = createValue(S1, CompressionConfig::NONE);
verifyValue(S1, v);
}