File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed
profiler/src/test/java/com/splunk/opentelemetry/profiler Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change 1919import static com .splunk .opentelemetry .profiler .Configuration .CONFIG_KEY_CALL_STACK_INTERVAL ;
2020import static org .junit .jupiter .api .Assertions .assertEquals ;
2121import static org .junit .jupiter .api .Assertions .assertNotSame ;
22+ import static org .mockito .ArgumentMatchers .any ;
23+ import static org .mockito .ArgumentMatchers .eq ;
2224import static org .mockito .Mockito .mock ;
2325import 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 );
Original file line number Diff line number Diff 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" ))
You can’t perform that action at this time.
0 commit comments