Skip to content

Commit

Permalink
improve tests
Browse files Browse the repository at this point in the history
  • Loading branch information
odygrd committed Sep 9, 2024
1 parent 47aa82e commit 0fb6172
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,12 @@ TEST_CASE("console_sink_stdout_multiple_formats")
static std::string const logger_name_b = "logger_b";

// Start the logging backend thread
Backend::start();
BackendOptions bo;

// Silence the error_notifier as we are capturing the stdout in the test, we do not want extra messages
bo.error_notifier = [](std::string const&) {};

Backend::start(bo);

quill::testing::CaptureStdout();

Expand Down
7 changes: 6 additions & 1 deletion test/integration_tests/JsonConsoleLoggingTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,12 @@ TEST_CASE("json_console_logging")
static std::string const logger_name_a = "logger_a";

// Start the logging backend thread
Backend::start();
BackendOptions bo;

// Silence the error_notifier as we are capturing the stdout in the test, we do not want extra messages
bo.error_notifier = [](std::string const&) {};

Backend::start(bo);

quill::testing::CaptureStdout();

Expand Down
7 changes: 6 additions & 1 deletion test/integration_tests/MultipleSinksSameLoggerTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,12 @@ TEST_CASE("multiple_sinks_same_logger")
static constexpr char const* filename = "multiple_sinks_same_logger.log";

// Start the logging backend thread
Backend::start();
BackendOptions bo;

// Silence the error_notifier as we are capturing the stdout in the test, we do not want extra messages
bo.error_notifier = [](std::string const&) {};

Backend::start(bo);

quill::testing::CaptureStdout();

Expand Down

0 comments on commit 0fb6172

Please sign in to comment.