mirror of
https://github.com/XRPLF/clio.git
synced 2025-12-06 17:27:58 +00:00
fix: Keep spdlog loggers valid between tests (#2614)
This commit is contained in:
@@ -50,7 +50,7 @@ constinit auto const kLEDGER_HASH2 = "1B8590C01B0006EDFA9ED60296DD052DC5E90F9965
|
||||
constinit auto const kSEQ = 30;
|
||||
} // namespace
|
||||
|
||||
struct ExtractionModelNgTests : NoLoggerFixture {};
|
||||
struct ExtractionModelNgTests : virtual public ::testing::Test {};
|
||||
|
||||
TEST_F(ExtractionModelNgTests, LedgerDataCopyableAndEquatable)
|
||||
{
|
||||
@@ -178,7 +178,7 @@ TEST_F(ExtractionModelNgTests, BookSuccessorCopyableAndEquatable)
|
||||
}
|
||||
}
|
||||
|
||||
struct ExtractionNgTests : NoLoggerFixture {};
|
||||
struct ExtractionNgTests : public virtual ::testing::Test {};
|
||||
|
||||
TEST_F(ExtractionNgTests, ModType)
|
||||
{
|
||||
@@ -360,7 +360,7 @@ TEST_F(ExtractionNgTests, SuccessorsWithNoNeighborsIncluded)
|
||||
ASSERT_FALSE(res.has_value());
|
||||
}
|
||||
|
||||
struct ExtractionAssertTest : common::util::WithMockAssert, NoLoggerFixture {};
|
||||
struct ExtractionAssertTest : common::util::WithMockAssert {};
|
||||
|
||||
TEST_F(ExtractionAssertTest, InvalidModTypeAsserts)
|
||||
{
|
||||
|
||||
@@ -67,7 +67,7 @@ struct MockLoadObserver : etlng::InitialLoadObserverInterface {
|
||||
);
|
||||
};
|
||||
|
||||
struct GrpcSourceNgTests : virtual NoLoggerFixture, tests::util::WithMockXrpLedgerAPIService {
|
||||
struct GrpcSourceNgTests : virtual public ::testing::Test, tests::util::WithMockXrpLedgerAPIService {
|
||||
GrpcSourceNgTests()
|
||||
: WithMockXrpLedgerAPIService("localhost:0"), grpcSource_("localhost", std::to_string(getXRPLMockPort()))
|
||||
{
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
|
||||
using namespace etlng::impl;
|
||||
|
||||
struct NetworkValidatedLedgersTests : NoLoggerFixture {
|
||||
struct NetworkValidatedLedgersTests : virtual public ::testing::Test {
|
||||
protected:
|
||||
util::async::CoroExecutionContext ctx_{2};
|
||||
std::shared_ptr<etl::NetworkValidatedLedgersInterface> ledgers_ =
|
||||
|
||||
@@ -254,7 +254,7 @@ struct MockExtNftBurnReadonly {
|
||||
}
|
||||
};
|
||||
|
||||
struct RegistryTest : NoLoggerFixture, util::prometheus::WithPrometheus {
|
||||
struct RegistryTest : util::prometheus::WithPrometheus {
|
||||
RegistryTest()
|
||||
{
|
||||
state_.isWriting = true;
|
||||
|
||||
@@ -52,7 +52,7 @@ public:
|
||||
};
|
||||
} // namespace
|
||||
|
||||
struct ForwardSchedulerTests : NoLoggerFixture {
|
||||
struct ForwardSchedulerTests : virtual public ::testing::Test {
|
||||
protected:
|
||||
MockNetworkValidatedLedgersPtr networkValidatedLedgers_;
|
||||
};
|
||||
|
||||
@@ -86,7 +86,7 @@ struct MockMonitor : etlng::MonitorInterface {
|
||||
MOCK_METHOD(void, stop, (), (override));
|
||||
};
|
||||
|
||||
struct TaskManagerTests : NoLoggerFixture {
|
||||
struct TaskManagerTests : virtual public ::testing::Test {
|
||||
using MockSchedulerType = testing::NiceMock<MockScheduler>;
|
||||
using MockExtractorType = testing::NiceMock<MockExtractor>;
|
||||
using MockLoaderType = testing::NiceMock<MockLoader>;
|
||||
|
||||
@@ -59,7 +59,7 @@ createTestData()
|
||||
|
||||
} // namespace
|
||||
|
||||
struct CacheExtTests : NoLoggerFixture, util::prometheus::WithPrometheus {
|
||||
struct CacheExtTests : util::prometheus::WithPrometheus {
|
||||
protected:
|
||||
MockLedgerCache cache_;
|
||||
std::shared_ptr<etlng::impl::CacheUpdater> updater_ = std::make_shared<etlng::impl::CacheUpdater>(cache_);
|
||||
|
||||
Reference in New Issue
Block a user