diff --git a/.github/scripts/levelization/results/ordering.txt b/.github/scripts/levelization/results/ordering.txt index b829510b60..0759def1dc 100644 --- a/.github/scripts/levelization/results/ordering.txt +++ b/.github/scripts/levelization/results/ordering.txt @@ -186,6 +186,7 @@ test.shamap > xrpl.basics test.shamap > xrpl.nodestore test.shamap > xrpl.protocol test.shamap > xrpl.shamap +test.telemetry > xrpl.basics test.telemetry > xrpl.core test.telemetry > xrpld.telemetry test.toplevel > test.csf diff --git a/src/test/telemetry/MetricsRegistry_test.cpp b/src/test/telemetry/MetricsRegistry_test.cpp index d05709daf7..421c2e27ec 100644 --- a/src/test/telemetry/MetricsRegistry_test.cpp +++ b/src/test/telemetry/MetricsRegistry_test.cpp @@ -20,11 +20,20 @@ #include -#include +#include +#include +#include +#include +#include #include -namespace xrpl { -namespace test { +#include + +#include +#include +#include + +namespace xrpl::test { /** Minimal mock ServiceRegistry for MetricsRegistry testing. @@ -194,12 +203,12 @@ public: { throwUnimplemented(); } - OpenLedger& + [[nodiscard]] OpenLedger& getOpenLedger() override { throwUnimplemented(); } - OpenLedger const& + [[nodiscard]] OpenLedger const& getOpenLedger() const override { throwUnimplemented(); @@ -249,7 +258,7 @@ public: { return nullptr; } - bool + [[nodiscard]] bool isStopping() const override { return false; @@ -269,7 +278,7 @@ public: { throwUnimplemented(); } - std::optional const& + [[nodiscard]] std::optional const& getTrapTxID() const override { static std::optional const empty; @@ -295,10 +304,10 @@ class MetricsRegistry_test : public beast::unit_test::suite testcase("Disabled construction"); MockServiceRegistry mockApp; - beast::Journal j(beast::Journal::getNullSink()); + beast::Journal const j(beast::Journal::getNullSink()); // Construct with enabled=false; should be a no-op. - telemetry::MetricsRegistry registry(false, mockApp, j); + telemetry::MetricsRegistry const registry(false, mockApp, j); BEAST_EXPECT(!registry.isEnabled()); } @@ -308,7 +317,7 @@ class MetricsRegistry_test : public beast::unit_test::suite testcase("Disabled start/stop"); MockServiceRegistry mockApp; - beast::Journal j(beast::Journal::getNullSink()); + beast::Journal const j(beast::Journal::getNullSink()); telemetry::MetricsRegistry registry(false, mockApp, j); @@ -328,7 +337,7 @@ class MetricsRegistry_test : public beast::unit_test::suite testcase("Disabled recording methods"); MockServiceRegistry mockApp; - beast::Journal j(beast::Journal::getNullSink()); + beast::Journal const j(beast::Journal::getNullSink()); telemetry::MetricsRegistry registry(false, mockApp, j); registry.start("http://localhost:4318/v1/metrics"); @@ -352,7 +361,7 @@ class MetricsRegistry_test : public beast::unit_test::suite testcase("Destructor calls stop"); MockServiceRegistry mockApp; - beast::Journal j(beast::Journal::getNullSink()); + beast::Journal const j(beast::Journal::getNullSink()); { // Let the destructor handle cleanup. @@ -377,5 +386,4 @@ public: BEAST_DEFINE_TESTSUITE(MetricsRegistry, telemetry, xrpl); -} // namespace test -} // namespace xrpl +} // namespace xrpl::test