fix(tests): allow multi threaded writes to suite log

This commit is contained in:
Nicholas Dudfield
2025-07-29 08:25:07 +07:00
parent 44148e82e8
commit d64ba81105

View File

@@ -19,9 +19,9 @@
#ifndef TEST_UNIT_TEST_SUITE_JOURNAL_H
#define TEST_UNIT_TEST_SUITE_JOURNAL_H
#include <ripple/beast/unit_test.h>
#include <ripple/beast/utility/Journal.h>
#include <mutex>
namespace ripple {
namespace test {
@@ -82,7 +82,11 @@ SuiteJournalSink::write(
// Only write the string if the level at least equals the threshold.
if (level >= threshold())
{
static std::mutex log_mutex;
std::lock_guard lock(log_mutex);
suite_.log << s << partition_ << text << std::endl;
}
}
class SuiteJournal