Skip to content

Commit ff6ca73

Browse files
committed
Update test method setup to avoid creating build plugin until it's determined that we're in the version of the support package with gRPC
1 parent 21ddf0c commit ff6ca73

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

test/tbuildtoolplugin.m

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,11 @@ function setup(testCase)
2929
end
3030

3131
function onlyTestIfgRPCIsInstalled(testCase)
32+
% Do not run if gRPC is not installed
3233
testCase.assumeTrue(logical(exist("opentelemetry.exporters.otlp.OtlpGrpcSpanExporter", "class")), ...
3334
"Otlp gRPC exporter must be installed.");
34-
end
35-
36-
function createBuildRunner(testCase)
35+
36+
% Set up build runner
3737
plugin = matlab.buildtool.plugins.OpenTelemetryPlugin();
3838
testCase.BuildRunner = matlab.buildtool.BuildRunner.withNoPlugins();
3939
testCase.BuildRunner.addPlugin(plugin);
@@ -474,4 +474,4 @@ function buildToolDoesNotConfigureOTelWhenEnvVariableSet(testCase)
474474
end
475475

476476
error("No span found");
477-
end
477+
end

0 commit comments

Comments
 (0)