Skip to content

Commit

Permalink
Update test
Browse files Browse the repository at this point in the history
  • Loading branch information
nepridumalnik committed Jan 16, 2025
1 parent 744a63f commit b956ca8
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions core/src/tracing/span_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -699,21 +699,18 @@ UTEST_F(Span, MakeSpanWithParentIdTraceIdLinkWithExisting) {
}
}

UTEST_F(Span, MakeSpanEvent) {
UTEST_F(OpentracingSpan, MakeSpanEvent) {
{
tracing::Span root_span("root_span");

auto error_span = root_span.CreateChild("event_span");
error_span.AddEvent("necessary_event");
root_span.AddEvent("important_event");
}

logging::LogFlush();
FlushOpentracing();

[[clang::optnone]] const auto logs_raw = GetStreamString();
const auto logs_raw = GetOtStreamString();

EXPECT_THAT(logs_raw, HasSubstr("events={\"necessary_event\":"));
EXPECT_THAT(logs_raw, HasSubstr("events={\"important_event\":"));
EXPECT_THAT(logs_raw, HasSubstr("root_span"));
EXPECT_THAT(logs_raw, HasSubstr("event_span"));
}

USERVER_NAMESPACE_END

0 comments on commit b956ca8

Please sign in to comment.