Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Return Scope object instead of unique_ptr<Scope> from Tracer::WithActiveSpan() #788

Merged
merged 17 commits into from
May 25, 2021
Merged
24 changes: 12 additions & 12 deletions exporters/etw/test/etw_tracer_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -116,13 +116,13 @@ TEST(ETWTracer, TracerCheck)
};
EXPECT_NO_THROW(innerSpan->AddEvent(eventName3, event3));
std::this_thread::sleep_for (std::chrono::seconds(1));
innerSpan->End();
ThomsonTan marked this conversation as resolved.
Show resolved Hide resolved
EXPECT_NO_THROW(innerSpan->End());

}
outerSpan->End();
EXPECT_NO_THROW(outerSpan->End());

}
topSpan->End();
EXPECT_NO_THROW(topSpan->End());
}

EXPECT_NO_THROW(tracer->CloseWithMicroseconds(0));
Expand Down Expand Up @@ -168,11 +168,11 @@ TEST(ETWTracer, TracerCheckMinDecoration)
{
auto cSpan = tracer->StartSpan("C.min");
auto cScope = tracer->WithActiveSpan(cSpan);
cSpan->End();
EXPECT_NO_THROW(cSpan->End());
}
bSpan->End();
EXPECT_NO_THROW(bSpan->End());
}
aSpan->End();
EXPECT_NO_THROW(aSpan->End());
}
tracer->CloseWithMicroseconds(0);
}
Expand Down Expand Up @@ -219,11 +219,11 @@ TEST(ETWTracer, TracerCheckMaxDecoration)
{
auto cSpan = tracer->StartSpan("C.max");
auto cScope = tracer->WithActiveSpan(cSpan);
cSpan->End();
EXPECT_NO_THROW(cSpan->End());
}
bSpan->End();
EXPECT_NO_THROW(bSpan->End());
}
aSpan->End();
EXPECT_NO_THROW(aSpan->End());
}
tracer->CloseWithMicroseconds(0);
}
Expand Down Expand Up @@ -257,11 +257,11 @@ TEST(ETWTracer, TracerCheckMsgPack)
{"strKey", "someValue"}
};
cSpan->AddEvent(eventName, event);
cSpan->End();
EXPECT_NO_THROW(cSpan->End());
}
bSpan->End();
EXPECT_NO_THROW(bSpan->End());
}
aSpan->End();
EXPECT_NO_THROW(aSpan->End());
}
tracer->CloseWithMicroseconds(0);
}
Expand Down