From 613d6327efeced1bea3baba1c19b2f287d4cb53e Mon Sep 17 00:00:00 2001 From: ncteisen Date: Fri, 16 Mar 2018 08:42:08 -0700 Subject: [PATCH] Add more validation tests to channel_trace_test --- test/core/channel/channel_trace_test.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test/core/channel/channel_trace_test.cc b/test/core/channel/channel_trace_test.cc index 0ba13ff1367..3c73e336120 100644 --- a/test/core/channel/channel_trace_test.cc +++ b/test/core/channel/channel_trace_test.cc @@ -189,19 +189,24 @@ TEST_P(ChannelTracerTest, TestNesting) { RefCountedPtr tracer = MakeRefCounted(GetParam()); AddSimpleTrace(tracer); AddSimpleTrace(tracer); + ValidateChannelTrace(tracer, 2, GetParam()); RefCountedPtr sc1 = MakeRefCounted(GetParam()); tracer->AddTraceEventReferencingChannel( ChannelTrace::Severity::Info, grpc_slice_from_static_string("subchannel one created"), sc1); + ValidateChannelTrace(tracer, 3, GetParam()); AddSimpleTrace(sc1); RefCountedPtr conn1 = MakeRefCounted(GetParam()); // nesting one level deeper. sc1->AddTraceEventReferencingSubchannel( ChannelTrace::Severity::Info, grpc_slice_from_static_string("connection one created"), conn1); + ValidateChannelTrace(tracer, 3, GetParam()); AddSimpleTrace(conn1); AddSimpleTrace(tracer); AddSimpleTrace(tracer); + ValidateChannelTrace(tracer, 5, GetParam()); + ValidateChannelTrace(conn1, 1, GetParam()); RefCountedPtr sc2 = MakeRefCounted(GetParam()); tracer->AddTraceEventReferencingSubchannel( ChannelTrace::Severity::Info, @@ -212,6 +217,7 @@ TEST_P(ChannelTracerTest, TestNesting) { ChannelTrace::Severity::Warning, grpc_slice_from_static_string("subchannel one inactive"), sc1); AddSimpleTrace(tracer); + ValidateChannelTrace(tracer, 8, GetParam()); tracer.reset(nullptr); sc1.reset(nullptr); sc2.reset(nullptr);