Skip to content

Commit 8d46211

Browse files
committed
Fix ASAN failures
1 parent 8453236 commit 8d46211

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

tests/test_logger.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@
88
class SlickLoggerTest : public ::testing::Test {
99
protected:
1010
void TearDown() override {
11+
// Ensure the logger is fully stopped and reset between tests so that
12+
// sinks (and the string_view keys in sinkname_index_map_ that point
13+
// into their name strings) are destroyed before the next test starts.
14+
slick::logger::Logger::instance().shutdown();
15+
slick::logger::Logger::instance().reset();
16+
1117
// Clean up all test log files
1218
std::filesystem::remove("test.log");
1319
std::filesystem::remove("test_mt.log");

0 commit comments

Comments
 (0)