From 5610c02eeb1d0b7157a3ce4f9b4f5720810628bc Mon Sep 17 00:00:00 2001 From: Matt Richardson Date: Wed, 27 Nov 2024 10:14:15 +1100 Subject: [PATCH] Dont need a mock, we can just pass null --- .../octopus/teamcity/opentelemetry/server/OTELHelperTest.java | 2 +- .../opentelemetry/server/TeamCityBuildListenerTest.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/server/src/test/java/com/octopus/teamcity/opentelemetry/server/OTELHelperTest.java b/server/src/test/java/com/octopus/teamcity/opentelemetry/server/OTELHelperTest.java index 84a1149..e56ea16 100644 --- a/server/src/test/java/com/octopus/teamcity/opentelemetry/server/OTELHelperTest.java +++ b/server/src/test/java/com/octopus/teamcity/opentelemetry/server/OTELHelperTest.java @@ -33,7 +33,7 @@ class OTELHelperTest { @BeforeEach void setUp() { GlobalOpenTelemetry.resetForTest(); - this.otelHelper = new OTELHelperImpl(mock(SpanProcessor.class, RETURNS_DEEP_STUBS), mock(MetricExporter.class, RETURNS_DEEP_STUBS), "helperNamr"); + this.otelHelper = new OTELHelperImpl(mock(SpanProcessor.class, RETURNS_DEEP_STUBS), null, "helperNamr"); } diff --git a/server/src/test/java/com/octopus/teamcity/opentelemetry/server/TeamCityBuildListenerTest.java b/server/src/test/java/com/octopus/teamcity/opentelemetry/server/TeamCityBuildListenerTest.java index e420c6e..e83e81d 100644 --- a/server/src/test/java/com/octopus/teamcity/opentelemetry/server/TeamCityBuildListenerTest.java +++ b/server/src/test/java/com/octopus/teamcity/opentelemetry/server/TeamCityBuildListenerTest.java @@ -34,7 +34,7 @@ class TeamCityBuildListenerTest { @BeforeEach void setUp(@Mock EventDispatcher buildServerListenerEventDispatcher) { GlobalOpenTelemetry.resetForTest(); - this.otelHelper = new OTELHelperImpl(mock(SpanProcessor.class, RETURNS_DEEP_STUBS), mock(MetricExporter.class, RETURNS_DEEP_STUBS), "helper"); + this.otelHelper = new OTELHelperImpl(mock(SpanProcessor.class, RETURNS_DEEP_STUBS), null, "helper"); this.factory = mock(OTELHelperFactory.class, RETURNS_DEEP_STUBS); var buildStorageManager = mock(BuildStorageManager.class, RETURNS_DEEP_STUBS);