aboutsummaryrefslogtreecommitdiffstats
path: root/searchcore/src/tests/proton/attribute/attribute_manager/attribute_manager_test.cpp
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2023-07-23 10:53:10 +0000
committerHenning Baldersheim <balder@yahoo-inc.com>2023-07-25 07:57:52 +0000
commit59192dd1d07356497ea311b7f0d6a3b50f726f13 (patch)
tree5f9492d5ce9dd1e4b0125f7d6318127c30a964d6 /searchcore/src/tests/proton/attribute/attribute_manager/attribute_manager_test.cpp
parent78a211072a21ec5f368b99bce19c1b703d98152d (diff)
Prefer std::filesystem::exists over FastOS_StatInfo
Diffstat (limited to 'searchcore/src/tests/proton/attribute/attribute_manager/attribute_manager_test.cpp')
-rw-r--r--searchcore/src/tests/proton/attribute/attribute_manager/attribute_manager_test.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/searchcore/src/tests/proton/attribute/attribute_manager/attribute_manager_test.cpp b/searchcore/src/tests/proton/attribute/attribute_manager/attribute_manager_test.cpp
index 140012624c2..2bf7aa85a0c 100644
--- a/searchcore/src/tests/proton/attribute/attribute_manager/attribute_manager_test.cpp
+++ b/searchcore/src/tests/proton/attribute/attribute_manager/attribute_manager_test.cpp
@@ -39,7 +39,6 @@
#include <vespa/vespalib/util/size_literals.h>
#include <vespa/vespalib/util/threadstackexecutor.h>
#include <vespa/config-attributes.h>
-#include <vespa/fastos/file.h>
#include <vespa/log/log.h>
LOG_SETUP("attribute_manager_test");
@@ -77,6 +76,8 @@ using AVConfig = search::attribute::Config;
using AttrSpecList = proton::AttributeCollectionSpec::AttributeList;
using AttrMgrSpec = proton::AttributeCollectionSpec;
+namespace fs = std::filesystem;
+
namespace {
const uint64_t createSerialNum = 42u;
@@ -567,10 +568,9 @@ TEST_F("require that removed fields can be pruned", Fixture)
SequentialAttributeManager sam(f._m, AttrMgrSpec(std::move(newSpec), 1, 11));
sam.mgr.pruneRemovedFields(11);
- FastOS_StatInfo si;
- EXPECT_TRUE(!FastOS_File::Stat(vespalib::string(test_dir + "/a1").c_str(), &si));
- EXPECT_TRUE(FastOS_File::Stat(vespalib::string(test_dir + "/a2").c_str(), &si));
- EXPECT_TRUE(!FastOS_File::Stat(vespalib::string(test_dir + "/a3").c_str(), &si));
+ EXPECT_FALSE(fs::exists(fs::path(test_dir + "/a1")));
+ EXPECT_TRUE(fs::exists(fs::path(test_dir + "/a2")));
+ EXPECT_FALSE(fs::exists(fs::path(test_dir + "/a3")));
}
TEST_F("require that lid space can be compacted", Fixture)
@@ -905,6 +905,6 @@ TEST_F("late create serial number is set on new attributes", Fixture)
TEST_MAIN()
{
- std::filesystem::remove_all(std::filesystem::path(test_dir));
+ fs::remove_all(fs::path(test_dir));
TEST_RUN_ALL();
}