mirror of
https://github.com/XRPLF/clio.git
synced 2025-12-06 17:27:58 +00:00
refactor: Add str() method to BaseTagDecorator (#2020)
Fix: https://github.com/XRPLF/clio/issues/2008
This commit is contained in:
@@ -1204,19 +1204,13 @@ struct RPCHelpersLogDurationTest : LoggerFixture, testing::WithParamInterface<RP
|
||||
TEST_P(RPCHelpersLogDurationTest, LogDuration)
|
||||
{
|
||||
auto const& tag = taggable.tag();
|
||||
// TOOD: Update in https://github.com/XRPLF/clio/issues/2008
|
||||
auto const tagStr = [&tag]() {
|
||||
std::stringstream ss;
|
||||
ss << tag;
|
||||
return ss.str();
|
||||
}();
|
||||
|
||||
logDuration(request, tag, GetParam().duration);
|
||||
|
||||
std::string const output = getLoggerString();
|
||||
|
||||
EXPECT_NE(output.find(GetParam().expectedLogLevel), std::string::npos) << output;
|
||||
EXPECT_NE(output.find(tagStr), std::string::npos);
|
||||
EXPECT_NE(output.find(tag.toString()), std::string::npos);
|
||||
|
||||
if (GetParam().expectDuration) {
|
||||
std::string const durationStr = std::to_string(GetParam().duration.count()) + " milliseconds";
|
||||
|
||||
Reference in New Issue
Block a user