diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2022-07-03 20:22:48 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-03 20:22:48 +0200 |
commit | b7c574bcad0ddf2bd5ec29ed9370584a7ef0082c (patch) | |
tree | 72c25220ad97384dd2633be9bc07e3d1c194c4a8 | |
parent | 676056859c7aa8b52c024bcec75b395994413c82 (diff) | |
parent | 5196578023bde01331765941040e30179d479c24 (diff) |
Merge pull request #23327 from vespa-engine/toregge/use-std-filesystem-resize-file
Use std::filesystem::resize_file.
-rw-r--r-- | searchlib/src/tests/docstore/logdatastore/logdatastore_test.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/searchlib/src/tests/docstore/logdatastore/logdatastore_test.cpp b/searchlib/src/tests/docstore/logdatastore/logdatastore_test.cpp index 418182f7bbf..9538db391df 100644 --- a/searchlib/src/tests/docstore/logdatastore/logdatastore_test.cpp +++ b/searchlib/src/tests/docstore/logdatastore/logdatastore_test.cpp @@ -19,6 +19,7 @@ #include <vespa/vespalib/util/threadstackexecutor.h> #include <vespa/vespalib/util/size_literals.h> #include <vespa/vespalib/util/memory.h> +#include <filesystem> #include <iomanip> using document::BucketId; @@ -292,8 +293,7 @@ TEST("testTruncatedIdxFile"){ } const char * magic = "mumbo jumbo"; { - int truncate_result = truncate("bug-7257706-truncated/1422358701368384000.idx", 3830); - EXPECT_EQUAL(0, truncate_result); + std::filesystem::resize_file(std::filesystem::path("bug-7257706-truncated/1422358701368384000.idx"), 3830); LogDataStore datastore(executor, "bug-7257706-truncated", config, GrowStrategy(), TuneFileSummary(), fileHeaderContext, tlSyncer, nullptr); EXPECT_EQUAL(331ul, datastore.lastSyncToken()); |