diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2023-06-16 14:10:52 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-16 14:10:52 +0200 |
commit | d782ba728837c36c20f2b8b6e1757b7305e7b57b (patch) | |
tree | b7cb500d2d18be9cc8b16e157426242c813caa51 /searchlib/src/tests/docstore | |
parent | c37b765a10c583ed14ff8cde0e695e4eb1f03478 (diff) | |
parent | 1e229d508131b5099576e857132ce79a55342b4e (diff) |
Merge pull request #27431 from vespa-engine/balder/move-more
- Move when possible.
Diffstat (limited to 'searchlib/src/tests/docstore')
-rw-r--r-- | searchlib/src/tests/docstore/document_store/visitcache_test.cpp | 2 | ||||
-rw-r--r-- | searchlib/src/tests/docstore/logdatastore/logdatastore_test.cpp | 14 |
2 files changed, 8 insertions, 8 deletions
diff --git a/searchlib/src/tests/docstore/document_store/visitcache_test.cpp b/searchlib/src/tests/docstore/document_store/visitcache_test.cpp index 14e3c19fe33..3f80bb6004f 100644 --- a/searchlib/src/tests/docstore/document_store/visitcache_test.cpp +++ b/searchlib/src/tests/docstore/document_store/visitcache_test.cpp @@ -62,7 +62,7 @@ TEST("require that BlobSet can be built") { a.append(9, B("bbbbb",5)); verifyAB(a); CompressionConfig cfg(CompressionConfig::LZ4); - CompressedBlobSet ca(cfg, a); + CompressedBlobSet ca(cfg, std::move(a)); BlobSet b = ca.getBlobSet(); verifyAB(b); } diff --git a/searchlib/src/tests/docstore/logdatastore/logdatastore_test.cpp b/searchlib/src/tests/docstore/logdatastore/logdatastore_test.cpp index 1080d44f2fb..1ca020bca86 100644 --- a/searchlib/src/tests/docstore/logdatastore/logdatastore_test.cpp +++ b/searchlib/src/tests/docstore/logdatastore/logdatastore_test.cpp @@ -368,13 +368,13 @@ TEST("test visit cache does not cache empty ones and is able to access some back IDataStore & datastore = store.getStore(); VisitCache visitCache(datastore, 100000, CompressionConfig::Type::LZ4); - EXPECT_EQUAL(0u, visitCache.read({1}).size()); + EXPECT_EQUAL(12u, visitCache.read({1}).byteSize()); EXPECT_TRUE(visitCache.read({1}).empty()); datastore.write(1,1, A7, 7); - EXPECT_EQUAL(0u, visitCache.read({2}).size()); + EXPECT_EQUAL(12u, visitCache.read({2}).byteSize()); CompressedBlobSet cbs = visitCache.read({1}); EXPECT_FALSE(cbs.empty()); - EXPECT_EQUAL(19u, cbs.size()); + EXPECT_EQUAL(19u, cbs.byteSize()); BlobSet bs(cbs.getBlobSet()); EXPECT_EQUAL(7u, bs.get(1).size()); EXPECT_EQUAL(0, strncmp(A7, bs.get(1).c_str(), 7)); @@ -664,14 +664,14 @@ TEST("test that the integrated visit cache works.") { vcs.remove(17); TEST_DO(verifyCacheStats(ds.getCacheStats(), 101, 104, 97, BASE_SZ-671)); vcs.verifyVisit({7,9,17,19,67,88,89}, {7,9,19,67,88,89}, true); - TEST_DO(verifyCacheStats(ds.getCacheStats(), 101, 105, 98, BASE_SZ-89)); + TEST_DO(verifyCacheStats(ds.getCacheStats(), 101, 105, 98, BASE_SZ-70)); vcs.verifyVisit({41, 42}, true); - TEST_DO(verifyCacheStats(ds.getCacheStats(), 101, 106, 99, BASE_SZ+215)); + TEST_DO(verifyCacheStats(ds.getCacheStats(), 101, 106, 99, BASE_SZ+230)); vcs.verifyVisit({43, 44}, true); - TEST_DO(verifyCacheStats(ds.getCacheStats(), 101, 107, 100, BASE_SZ+520)); + TEST_DO(verifyCacheStats(ds.getCacheStats(), 101, 107, 100, BASE_SZ+540)); vcs.verifyVisit({41, 42, 43, 44}, true); - TEST_DO(verifyCacheStats(ds.getCacheStats(), 101, 108, 99, BASE_SZ+340)); + TEST_DO(verifyCacheStats(ds.getCacheStats(), 101, 108, 99, BASE_SZ+360)); } TEST("testWriteRead") { |