diff --git a/src/ripple/nodestore/tests/BackendTests.cpp b/src/ripple/nodestore/tests/BackendTests.cpp index de674af819..f056043c15 100644 --- a/src/ripple/nodestore/tests/BackendTests.cpp +++ b/src/ripple/nodestore/tests/BackendTests.cpp @@ -37,7 +37,7 @@ public: testcase ("Backend type=" + type); beast::StringPairArray params; - beast::File const path (beast::File::createTempFile ("node_db")); + beast::UnitTestUtilities::TempDirectory path ("node_db"); params.set ("type", type); params.set ("path", path.getFullPathName ()); diff --git a/src/ripple/nodestore/tests/DatabaseTests.cpp b/src/ripple/nodestore/tests/DatabaseTests.cpp index a951c10e3b..afa3dec809 100644 --- a/src/ripple/nodestore/tests/DatabaseTests.cpp +++ b/src/ripple/nodestore/tests/DatabaseTests.cpp @@ -30,7 +30,7 @@ public: DummyScheduler scheduler; - beast::File const node_db (beast::File::createTempFile ("node_db")); + beast::UnitTestUtilities::TempDirectory node_db ("node_db"); beast::StringPairArray srcParams; srcParams.set ("type", srcBackendType); srcParams.set ("path", node_db.getFullPathName ()); @@ -56,7 +56,7 @@ public: "test", scheduler, j, 2, srcParams)); // Set up the destination database - beast::File const dest_db (beast::File::createTempFile ("dest_db")); + beast::UnitTestUtilities::TempDirectory dest_db ("dest_db"); beast::StringPairArray destParams; destParams.set ("type", destBackendType); destParams.set ("path", dest_db.getFullPathName ()); @@ -98,12 +98,12 @@ public: testcase (s); - beast::File const node_db (beast::File::createTempFile ("node_db")); + beast::UnitTestUtilities::TempDirectory node_db ("node_db"); beast::StringPairArray nodeParams; nodeParams.set ("type", type); nodeParams.set ("path", node_db.getFullPathName ()); - beast::File const temp_db (beast::File::createTempFile ("temp_db")); + beast::UnitTestUtilities::TempDirectory temp_db ("temp_db"); beast::StringPairArray tempParams; if (useEphemeralDatabase) { diff --git a/src/ripple/nodestore/tests/TimingTests.cpp b/src/ripple/nodestore/tests/TimingTests.cpp index 931db54dea..45afaaf179 100644 --- a/src/ripple/nodestore/tests/TimingTests.cpp +++ b/src/ripple/nodestore/tests/TimingTests.cpp @@ -62,7 +62,8 @@ public: testcase ("Testing backend '" + type + "' performance"); beast::StringPairArray params; - beast::File const path (beast::File::createTempFile ("node_db")); + beast::UnitTestUtilities::TempDirectory path ("node_db"); + params.set ("type", type); params.set ("path", path.getFullPathName ());