fix(test): follow TempDir out of beast:: after the develop merge

develop moved TempDir from beast:: to xrpl::, deleting
include/xrpl/beast/utility/temp_dir.h in favour of
include/xrpl/basics/FileUtilities.h. The merge kept this branch's
references to the old API, so the tree no longer compiled: the missing
header is a fatal include, and because DatabaseConfig_test.cpp lands in
the xrpld unity blob it broke the xrpld target itself, not just the tests.

Swap the include and drop the stale beast:: qualifier on 17 uses. The
three src/tests/libxrpl/nodestore files already include FileUtilities.h
and already spell TempDir unqualified elsewhere, so only the qualifier
was wrong there. DatabaseConfig_test.cpp needed the include as well; it
sits in namespace xrpl::node_store, so unqualified TempDir resolves to
xrpl::TempDir through the enclosing namespace.

Two further uses exist only on the sync-diagnostics tip and are fixed
there rather than here.
This commit is contained in:
Pratik Mankawde
2026-08-20 13:55:07 +01:00
parent 7d9392aeb6
commit 4f4f0cf613
4 changed files with 18 additions and 18 deletions

View File

@@ -14,12 +14,12 @@
#include <xrpl/basics/Blob.h>
#include <xrpl/basics/ByteUtilities.h>
#include <xrpl/basics/FileUtilities.h>
#include <xrpl/basics/base_uint.h>
#include <xrpl/basics/random.h>
#include <xrpl/beast/unit_test/suite.h>
#include <xrpl/beast/utility/Journal.h>
#include <xrpl/beast/utility/rngfill.h>
#include <xrpl/beast/utility/temp_dir.h>
#include <xrpl/beast/xor_shift_engine.h>
#include <xrpl/config/BasicConfig.h>
#include <xrpl/config/Constants.h>
@@ -705,7 +705,7 @@ public:
DummyScheduler scheduler;
beast::TempDir const nodeDb;
TempDir const nodeDb;
Section nodeParams;
nodeParams.set(Keys::kType, "memory");
nodeParams.set(Keys::kPath, nodeDb.path());
@@ -774,7 +774,7 @@ public:
CountingScheduler scheduler;
beast::TempDir const nodeDb;
TempDir const nodeDb;
Section nodeParams;
nodeParams.set(Keys::kType, "nudb");
nodeParams.set(Keys::kPath, nodeDb.path());
@@ -863,8 +863,8 @@ public:
std::unique_ptr<DatabaseRotatingImp>
makeRotatingDatabase(
Scheduler& scheduler,
beast::TempDir const& writableDir,
beast::TempDir const& archiveDir)
TempDir const& writableDir,
TempDir const& archiveDir)
{
Section writableParams;
writableParams.set(Keys::kType, "nudb");
@@ -907,8 +907,8 @@ public:
CountingScheduler scheduler;
beast::TempDir const writableDir;
beast::TempDir const archiveDir;
TempDir const writableDir;
TempDir const archiveDir;
auto rotating = makeRotatingDatabase(scheduler, writableDir, archiveDir);
if (!BEAST_EXPECT(rotating))
@@ -1037,7 +1037,7 @@ public:
* @return The database, or nullptr on failure.
*/
std::unique_ptr<Database>
makeMeasuredDatabase(beast::TempDir const& dir, Scheduler& scheduler, int readThreads)
makeMeasuredDatabase(TempDir const& dir, Scheduler& scheduler, int readThreads)
{
Section params;
params.set(Keys::kType, "nudb");
@@ -1064,7 +1064,7 @@ public:
testcase("nodestore_state totals labels");
DummyScheduler scheduler;
beast::TempDir const nodeDb;
TempDir const nodeDb;
Section nodeParams;
nodeParams.set(Keys::kType, "nudb");
nodeParams.set(Keys::kPath, nodeDb.path());
@@ -1182,7 +1182,7 @@ public:
// publish NOTHING. Zeros here would read as a perfectly idle write
// path on a node whose write path is simply not instrumented.
{
beast::TempDir const memDb;
TempDir const memDb;
Section memParams;
memParams.set(Keys::kType, "memory");
memParams.set(Keys::kPath, memDb.path());
@@ -1203,7 +1203,7 @@ public:
BEAST_EXPECT(mem->getStoreCount() == 8);
}
beast::TempDir const nodeDb;
TempDir const nodeDb;
Section nodeParams;
nodeParams.set(Keys::kType, "nudb");
nodeParams.set(Keys::kPath, nodeDb.path());
@@ -1336,7 +1336,7 @@ public:
testcase("nodestore_state read-queue labels");
DummyScheduler scheduler;
beast::TempDir const nodeDb;
TempDir const nodeDb;
// Three read threads and a bundle of 7, neither of which is the
// default (the bundle default is 4), so a helper reading the wrong
// JSON member cannot agree by coincidence.