Skip to content

Commit 43bd074

Browse files
committed
Tests fixed
1 parent 3695261 commit 43bd074

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

profiler/src/test/java/com/splunk/opentelemetry/profiler/JfrSettingsOverridesTest.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
import static com.splunk.opentelemetry.profiler.Configuration.CONFIG_KEY_CALL_STACK_INTERVAL;
2020
import static org.junit.jupiter.api.Assertions.assertEquals;
2121
import static org.junit.jupiter.api.Assertions.assertNotSame;
22+
import static org.mockito.ArgumentMatchers.any;
23+
import static org.mockito.ArgumentMatchers.eq;
2224
import static org.mockito.Mockito.mock;
2325
import static org.mockito.Mockito.when;
2426

@@ -32,7 +34,7 @@ class JfrSettingsOverridesTest {
3234
@Test
3335
void testOverrides() {
3436
ConfigProperties config = mock(ConfigProperties.class);
35-
when(config.getDuration(CONFIG_KEY_CALL_STACK_INTERVAL, Duration.ZERO))
37+
when(config.getDuration(eq(CONFIG_KEY_CALL_STACK_INTERVAL), any(Duration.class)))
3638
.thenReturn(Duration.ofMillis(163));
3739
when(config.getBoolean("splunk.profiler.memory.enabled", false)).thenReturn(true);
3840
JfrSettingsOverrides overrides = new JfrSettingsOverrides(config);

profiler/src/test/java/com/splunk/opentelemetry/profiler/LogExporterBuilderTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ void testCustomEndpointGrpc() {
119119

120120
when(config.getString(Configuration.CONFIG_KEY_PROFILER_OTLP_PROTOCOL, null))
121121
.thenReturn("grpc");
122-
when(config.getString(Configuration.CONFIG_KEY_OTEL_OTLP_URL, null))
122+
when(config.getString(Configuration.CONFIG_KEY_OTEL_OTLP_URL))
123123
.thenReturn("http://shadowed.example.com:9122/");
124124
when(config.getString(Configuration.CONFIG_KEY_INGEST_URL, "http://shadowed.example.com:9122/"))
125125
.thenReturn(endpoint);
@@ -142,7 +142,7 @@ void testCustomEndpointHttp() {
142142

143143
when(config.getString(Configuration.CONFIG_KEY_PROFILER_OTLP_PROTOCOL, null))
144144
.thenReturn("http/protobuf");
145-
when(config.getString(Configuration.CONFIG_KEY_OTEL_OTLP_URL, null))
145+
when(config.getString(Configuration.CONFIG_KEY_OTEL_OTLP_URL))
146146
.thenReturn("http://shadowed.example.com:9122/");
147147
when(config.getString(
148148
Configuration.CONFIG_KEY_INGEST_URL, "http://shadowed.example.com:9122/v1/logs"))

0 commit comments

Comments
 (0)