File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -20,25 +20,25 @@ function setupOnce(testCase)
2020 testdir = fileparts(mfilename(" fullpath" ));
2121 addpath(fullfile(testdir , " .." )); % add directory where common setup and teardown code lives
2222 commonSetupOnce(testCase );
23+
24+ % create a global tracer provider
25+ import opentelemetry .sdk .trace .*
26+ tp = TracerProvider(BatchSpanProcessor());
27+ setTracerProvider(tp );
2328 end
2429 end
2530
2631 methods (TestMethodSetup )
2732 function setup(testCase )
2833 commonSetup(testCase );
29-
30- % create a global tracer provider
31- import opentelemetry .sdk .trace .*
32- tp = TracerProvider(BatchSpanProcessor());
33- setTracerProvider(tp );
3434 end
3535 end
3636
3737 methods (TestMethodTeardown )
3838 function teardown(testCase )
3939 % Flush all spans that have not yet been exported
4040 tp = opentelemetry .trace .Provider .getTracerProvider();
41- opentelemetry .sdk .trace .Cleanup .forceFlush(tp );
41+ assert( opentelemetry .sdk .trace .Cleanup .forceFlush(tp ) );
4242
4343 commonTeardown(testCase );
4444 end
You can’t perform that action at this time.
0 commit comments