fix: Keep spdlog loggers valid between tests (#2614)

This commit is contained in:
Ayaz Salikhov
2025-09-15 14:47:35 +01:00
committed by GitHub
parent e996f2b7ab
commit 3f2ada3439
53 changed files with 353 additions and 204 deletions

View File

@@ -30,7 +30,7 @@ using namespace data;
using namespace util::prometheus;
using namespace testing;
struct CorruptionDetectorTest : NoLoggerFixture, WithPrometheus {};
struct CorruptionDetectorTest : WithPrometheus {};
TEST_F(CorruptionDetectorTest, DisableCacheOnCorruption)
{

View File

@@ -32,7 +32,7 @@ namespace json = boost::json;
using namespace util;
using namespace testing;
struct ETLStateTest : public NoLoggerFixture {
struct ETLStateTest : public virtual ::testing::Test {
MockSource source = MockSource{};
};

View File

@@ -35,7 +35,7 @@ constexpr auto kSTART_SEQ = 1234;
} // namespace
class ETLExtractionDataPipeTest : public NoLoggerFixture {
class ETLExtractionDataPipeTest : public ::testing::Test {
protected:
etl::impl::ExtractionDataPipe<uint32_t> pipe_{kSTRIDE, kSTART_SEQ};
};

View File

@@ -34,7 +34,7 @@
using namespace testing;
using namespace etl;
struct ETLExtractorTest : util::prometheus::WithPrometheus, NoLoggerFixture {
struct ETLExtractorTest : util::prometheus::WithPrometheus {
using ExtractionDataPipeType = MockExtractionDataPipe;
using LedgerFetcherType = MockLedgerFetcher;
using ExtractorType = etl::impl::Extractor<ExtractionDataPipeType, LedgerFetcherType>;

View File

@@ -41,7 +41,7 @@
using namespace etl::impl;
using namespace util::config;
struct GrpcSourceTests : NoLoggerFixture, util::prometheus::WithPrometheus, tests::util::WithMockXrpLedgerAPIService {
struct GrpcSourceTests : util::prometheus::WithPrometheus, tests::util::WithMockXrpLedgerAPIService {
GrpcSourceTests()
: WithMockXrpLedgerAPIService("localhost:0")
, mockBackend_(std::make_shared<testing::StrictMock<MockBackend>>(ClioConfigDefinition{}))

View File

@@ -56,7 +56,7 @@ constexpr auto kOFFER_ID = "AA86CBF29770F72FA3FF4A5D9A9FA54D6F399A8E038F72393EF7
} // namespace
struct NFTHelpersTest : NoLoggerFixture {
struct NFTHelpersTest : virtual public ::testing::Test {
protected:
static void
verifyNFTTransactionsData(