fix(test): use SuiteJournal and drop an unused local

beast::Journal has no default constructor, so holding one as a plain
member deleted the suite's own default constructor and the Beast
registration macro could not instantiate it. SuiteJournal takes the
suite, converts implicitly where a journal is expected, and routes log
output into the test report.

Also removes a leftover unused local in run(), which is a hard error
under the warnings-as-errors build.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Pratik Mankawde
2026-07-27 20:45:04 +01:00
parent 05d01de81a
commit e3c2f8279a

View File

@@ -1,6 +1,7 @@
#include <test/jtx/CheckMessageLogs.h>
#include <test/jtx/Env.h>
#include <test/jtx/envconfig.h>
#include <test/unit_test/SuiteJournal.h>
#include <xrpld/core/Config.h>
@@ -41,9 +42,11 @@ private:
*
* The nodestore suites that used to share these helpers moved to GTest,
* taking their common base with them. This suite stayed on Beast, so it
* keeps its own copy of the few pieces it needs.
* keeps its own copy of the few pieces it needs. SuiteJournal rather than
* a bare beast::Journal, which has no default constructor; it converts
* implicitly where a journal is expected.
*/
beast::Journal journal_;
test::SuiteJournal journal_{"DatabaseConfig_test", *this};
/**
* Build a batch of node objects that is the same for a given seed.
@@ -855,8 +858,6 @@ public:
void
run() override
{
std::int64_t const seedValue = 50;
testCounterWidths();
testDurationAccessors();