diff options
Diffstat (limited to 'searchlib/src/tests/docstore/logdatastore/logdatastore_test.cpp')
-rw-r--r-- | searchlib/src/tests/docstore/logdatastore/logdatastore_test.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/searchlib/src/tests/docstore/logdatastore/logdatastore_test.cpp b/searchlib/src/tests/docstore/logdatastore/logdatastore_test.cpp index fffa1778c85..418182f7bbf 100644 --- a/searchlib/src/tests/docstore/logdatastore/logdatastore_test.cpp +++ b/searchlib/src/tests/docstore/logdatastore/logdatastore_test.cpp @@ -18,6 +18,7 @@ #include <vespa/vespalib/util/exceptions.h> #include <vespa/vespalib/util/threadstackexecutor.h> #include <vespa/vespalib/util/size_literals.h> +#include <vespa/vespalib/util/memory.h> #include <iomanip> using document::BucketId; @@ -275,7 +276,7 @@ void fetchAndTest(IDataStore & datastore, uint32_t lid, const void *a, size_t sz vespalib::DataBuffer buf; EXPECT_EQUAL(static_cast<ssize_t>(sz), datastore.read(lid, buf)); EXPECT_EQUAL(buf.getDataLen(), sz); - EXPECT_TRUE(memcmp(a, buf.getData(), sz) == 0); + EXPECT_TRUE(vespalib::memcmp_safe(a, buf.getData(), sz) == 0); } TEST("testTruncatedIdxFile"){ @@ -666,13 +667,13 @@ TEST("test that the integrated visit cache works.") { } TEST("testWriteRead") { - FastOS_File::RemoveDirectory("empty"); + std::filesystem::remove_all(std::filesystem::path("empty")); const char * bufA = "aaaaaaaaaaaaaaaaaaaaa"; const char * bufB = "bbbbbbbbbbbbbbbb"; const vespalib::ConstBufferRef a[2] = { vespalib::ConstBufferRef(bufA, strlen(bufA)), vespalib::ConstBufferRef(bufB, strlen(bufB))}; LogDataStore::Config config; { - EXPECT_TRUE(FastOS_File::MakeDirectory("empty")); + std::filesystem::create_directory(std::filesystem::path("empty")); DummyFileHeaderContext fileHeaderContext; vespalib::ThreadStackExecutor executor(1, 128_Ki); MyTlSyncer tlSyncer; @@ -736,7 +737,7 @@ TEST("testWriteRead") { EXPECT_EQUAL(0ul, datastore.getDiskBloat()); EXPECT_EQUAL(0ul, datastore.getMaxSpreadAsBloat()); } - FastOS_File::EmptyAndRemoveDirectory("empty"); + std::filesystem::remove_all(std::filesystem::path("empty")); } TEST("requireThatSyncTokenIsUpdatedAfterFlush") { |