aboutsummaryrefslogtreecommitdiffstats
path: root/searchcore
diff options
context:
space:
mode:
authorTor Egge <Tor.Egge@online.no>2022-06-02 15:10:46 +0200
committerTor Egge <Tor.Egge@online.no>2022-06-02 15:10:46 +0200
commitd8db0245a5aad9fbc0568bb11db99d9c5394d1a5 (patch)
treec05f7bd6065b7c77c7f7c98c0fadb02bbc8f7898 /searchcore
parentd28745bcca2737bd716fb001a1417cdfb1febd96 (diff)
Remove most use of vespalib::rmdir in searchlib.
Diffstat (limited to 'searchcore')
-rw-r--r--searchcore/src/tests/proton/attribute/attribute_initializer/attribute_initializer_test.cpp4
-rw-r--r--searchcore/src/tests/proton/attribute/attribute_manager/attribute_manager_test.cpp2
-rw-r--r--searchcore/src/tests/proton/attribute/attribute_populator/attribute_populator_test.cpp2
-rw-r--r--searchcore/src/tests/proton/common/hw_info_sampler/hw_info_sampler_test.cpp2
-rw-r--r--searchcore/src/tests/proton/documentdb/document_subdbs/document_subdbs_test.cpp1
-rw-r--r--searchcore/src/tests/proton/reprocessing/attribute_reprocessing_initializer/attribute_reprocessing_initializer_test.cpp2
6 files changed, 6 insertions, 7 deletions
diff --git a/searchcore/src/tests/proton/attribute/attribute_initializer/attribute_initializer_test.cpp b/searchcore/src/tests/proton/attribute/attribute_initializer/attribute_initializer_test.cpp
index 93cb456cc06..3016815a89c 100644
--- a/searchcore/src/tests/proton/attribute/attribute_initializer/attribute_initializer_test.cpp
+++ b/searchcore/src/tests/proton/attribute/attribute_initializer/attribute_initializer_test.cpp
@@ -67,7 +67,7 @@ saveAttr(const vespalib::string &name, const Config &cfg, SerialNum serialNum, S
auto writer = dir->getWriter();
writer->createInvalidSnapshot(serialNum);
auto snapshotdir = writer->getSnapshotDir(serialNum);
- vespalib::mkdir(snapshotdir);
+ std::filesystem::create_directory(std::filesystem::path(snapshotdir));
auto av = search::AttributeFactory::createAttribute(snapshotdir + "/" + name, cfg);
av->setCreateSerialNum(createSerialNum);
av->addReservedDoc();
@@ -245,6 +245,6 @@ TEST("require that transient memory usage is reported for attribute load without
TEST_MAIN()
{
- vespalib::rmdir(test_dir, true);
+ std::filesystem::remove_all(std::filesystem::path(test_dir));
TEST_RUN_ALL();
}
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 b446ca367c0..95f0cff088d 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
@@ -869,6 +869,6 @@ TEST_F("require that shrink flushtarget is handed over to new attribute manager"
TEST_MAIN()
{
- vespalib::rmdir(test_dir, true);
+ std::filesystem::remove_all(std::filesystem::path(test_dir));
TEST_RUN_ALL();
}
diff --git a/searchcore/src/tests/proton/attribute/attribute_populator/attribute_populator_test.cpp b/searchcore/src/tests/proton/attribute/attribute_populator/attribute_populator_test.cpp
index 0d09d45c33a..c66b2dd15dc 100644
--- a/searchcore/src/tests/proton/attribute/attribute_populator/attribute_populator_test.cpp
+++ b/searchcore/src/tests/proton/attribute/attribute_populator/attribute_populator_test.cpp
@@ -115,6 +115,6 @@ TEST_F("require that reprocess with document populates attribute", Fixture)
TEST_MAIN()
{
- vespalib::rmdir(TEST_DIR, true);
+ std::filesystem::remove_all(std::filesystem::path(TEST_DIR));
TEST_RUN_ALL();
}
diff --git a/searchcore/src/tests/proton/common/hw_info_sampler/hw_info_sampler_test.cpp b/searchcore/src/tests/proton/common/hw_info_sampler/hw_info_sampler_test.cpp
index b9894f660e1..585a8b38fe1 100644
--- a/searchcore/src/tests/proton/common/hw_info_sampler/hw_info_sampler_test.cpp
+++ b/searchcore/src/tests/proton/common/hw_info_sampler/hw_info_sampler_test.cpp
@@ -122,6 +122,6 @@ TEST_F("require that num cpu cores can be sampled", Fixture)
TEST_MAIN()
{
- vespalib::rmdir(test_dir, true);
+ std::filesystem::remove_all(std::filesystem::path(test_dir));
TEST_RUN_ALL();
}
diff --git a/searchcore/src/tests/proton/documentdb/document_subdbs/document_subdbs_test.cpp b/searchcore/src/tests/proton/documentdb/document_subdbs/document_subdbs_test.cpp
index cb3acdb7ec8..a9a75a1fc7a 100644
--- a/searchcore/src/tests/proton/documentdb/document_subdbs/document_subdbs_test.cpp
+++ b/searchcore/src/tests/proton/documentdb/document_subdbs/document_subdbs_test.cpp
@@ -64,7 +64,6 @@ using searchcorespi::index::IThreadingService;
using storage::spi::Timestamp;
using vespa::config::search::core::ProtonConfig;
using vespa::config::content::core::BucketspacesConfig;
-using vespalib::mkdir;
using vespalib::datastore::CompactionStrategy;
using proton::index::IndexConfig;
diff --git a/searchcore/src/tests/proton/reprocessing/attribute_reprocessing_initializer/attribute_reprocessing_initializer_test.cpp b/searchcore/src/tests/proton/reprocessing/attribute_reprocessing_initializer/attribute_reprocessing_initializer_test.cpp
index ebec0841ebf..46796738fa8 100644
--- a/searchcore/src/tests/proton/reprocessing/attribute_reprocessing_initializer/attribute_reprocessing_initializer_test.cpp
+++ b/searchcore/src/tests/proton/reprocessing/attribute_reprocessing_initializer/attribute_reprocessing_initializer_test.cpp
@@ -307,7 +307,7 @@ TEST(InterruptedTest, require_that_added_attribute_aspect_with_flushed_attribute
auto writer = dir->getWriter();
writer->createInvalidSnapshot(INIT_SERIAL_NUM);
auto snapshotdir = writer->getSnapshotDir(INIT_SERIAL_NUM);
- vespalib::mkdir(snapshotdir);
+ std::filesystem::create_directory(std::filesystem::path(snapshotdir));
writer->markValidSnapshot(INIT_SERIAL_NUM);
auto av = AttributeFactory::createAttribute(snapshotdir + "/a",
Config(BasicType::STRING));