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

@@ -38,7 +38,7 @@ using namespace util::config;
using namespace rpc::impl;
namespace json = boost::json;
class RPCAPIVersionTest : public NoLoggerFixture {
class RPCAPIVersionTest : public virtual ::testing::Test {
protected:
ProductionAPIVersionParser parser_{kDEFAULT_API_VERSION, kMIN_API_VERSION, kMAX_API_VERSION};
};

View File

@@ -49,7 +49,7 @@ using namespace rpc::modifiers;
namespace json = boost::json;
class RPCBaseTest : public NoLoggerFixture {};
class RPCBaseTest : public virtual ::testing::Test {};
TEST_F(RPCBaseTest, CheckType)
{

View File

@@ -38,7 +38,7 @@ using util::prometheus::CounterInt;
using util::prometheus::WithMockPrometheus;
using util::prometheus::WithPrometheus;
struct RPCCountersTest : WithPrometheus, NoLoggerFixture {
struct RPCCountersTest : WithPrometheus {
WorkQueue queue{4u, 1024u}; // todo: mock instead
Counters counters{queue};
};

View File

@@ -39,7 +39,7 @@ using namespace util::config;
using namespace rpc;
using namespace util::prometheus;
struct RPCWorkQueueTestBase : NoLoggerFixture {
struct RPCWorkQueueTestBase : public virtual ::testing::Test {
ClioConfigDefinition cfg = {
{"server.max_queue_size", ConfigValue{ConfigType::Integer}.defaultValue(2)},
{"workers", ConfigValue{ConfigType::Integer}.defaultValue(4)}