@@ -30,32 +30,40 @@ function setupOnce(testCase)
3030
3131 methods (TestMethodSetup )
3232 function setup(testCase )
33+ disp(" start setup" )
3334 commonSetup(testCase );
35+ disp(" end setup" )
3436 end
3537 end
3638
3739 methods (TestMethodTeardown )
3840 function teardown(testCase )
41+ disp(" start teardown" )
3942 % Flush all spans that have not yet been exported
4043 tp = opentelemetry .trace .Provider .getTracerProvider();
4144 assert(opentelemetry .sdk .trace .Cleanup .forceFlush(tp ));
42-
45+ disp(" done forceFlush" )
46+
4347 commonTeardown(testCase );
48+ disp(" end teardown" )
4449 end
4550 end
4651
4752 methods (Test )
4853 function testSpan(testCase )
54+ disp(" start test" )
4955 % start and end a span
5056 tr = opentelemetry .trace .getTracer(" Tracer" );
5157
5258 testCase .startMeasuring();
5359 sp = startSpan(tr , " Span" );
5460 endSpan(sp );
5561 testCase .stopMeasuring();
62+ disp(" end test" )
5663 end
5764
5865 function testCurrentSpan(testCase )
66+ disp(" start test" )
5967 % start a span, put it in current context, end the span
6068 tr = opentelemetry .trace .getTracer(" Tracer" );
6169
@@ -64,9 +72,11 @@ function testCurrentSpan(testCase)
6472 scope = makeCurrent(sp ); % #ok<NASGU>
6573 endSpan(sp );
6674 testCase .stopMeasuring();
75+ disp(" end test" )
6776 end
6877
6978 function testNestedSpansImplicitContext(testCase )
79+ disp(" start test" )
7080 % nested spans, using current span as parent
7181 tr = opentelemetry .trace .getTracer(" Tracer" );
7282
@@ -83,9 +93,11 @@ function testNestedSpansImplicitContext(testCase)
8393 endSpan(isp );
8494 endSpan(osp );
8595 testCase .stopMeasuring();
96+ disp(" end test" )
8697 end
8798
8899 function testNestedSpansExplicitContext(testCase )
100+ disp(" start test" )
89101 % nested spans, explicitly setting parents
90102 tr = opentelemetry .trace .getTracer(" Tracer" );
91103
@@ -102,9 +114,11 @@ function testNestedSpansExplicitContext(testCase)
102114 endSpan(isp );
103115 endSpan(osp );
104116 testCase .stopMeasuring();
117+ disp(" end test" )
105118 end
106119
107120 function testAttributes(testCase )
121+ disp(" start test" )
108122 % span with 3 attributes
109123 tr = opentelemetry .trace .getTracer(" Tracer" );
110124 m = magic(4 );
@@ -115,9 +129,11 @@ function testAttributes(testCase)
115129 " attribute 3" , m );
116130 endSpan(sp );
117131 testCase .stopMeasuring()
132+ disp(" end test" )
118133 end
119134
120135 function testEvents(testCase )
136+ disp(" start test" )
121137 % span with 3 events
122138 tr = opentelemetry .trace .getTracer(" Tracer" );
123139
@@ -128,9 +144,11 @@ function testEvents(testCase)
128144 addEvent(sp , " event 3" );
129145 endSpan(sp );
130146 testCase .stopMeasuring()
147+ disp(" end test" )
131148 end
132149
133150 function testLinks(testCase )
151+ disp(" start test" )
134152 % span with 2 links
135153 tr = opentelemetry .trace .getTracer(" Tracer" );
136154 sp1 = startSpan(tr , " Span 1" );
@@ -144,6 +162,7 @@ function testLinks(testCase)
144162 sp3 = startSpan(tr , " Span 3" , Links= [link1 link2 ]);
145163 endSpan(sp3 );
146164 testCase .stopMeasuring()
165+ disp(" end test" )
147166 end
148167
149168 function testGetTracer(testCase )
@@ -161,6 +180,7 @@ function testCreateDefaultTracerProvider(testCase)
161180 end
162181
163182 function testSpanContext(testCase )
183+ disp(" start test" )
164184 % retrieve trace ID and span ID in the span context
165185 tr = opentelemetry .trace .getTracer(" Tracer" );
166186 sp = startSpan(tr , " Span" );
@@ -170,6 +190,7 @@ function testSpanContext(testCase)
170190 traceid = spctxt .TraceId ; % #ok<NASGU>
171191 spanid = spctxt .SpanId ; % #ok<NASGU>
172192 testCase .stopMeasuring();
193+ disp(" end test" )
173194 end
174195
175196 end
0 commit comments