diff --git a/inspectit-gepard-agent/src/test/java/rocks/inspectit/gepard/agent/integrationtest/IntegrationTestBase.java b/inspectit-gepard-agent/src/test/java/rocks/inspectit/gepard/agent/integrationtest/IntegrationTestBase.java index 44831b3..7c829e4 100644 --- a/inspectit-gepard-agent/src/test/java/rocks/inspectit/gepard/agent/integrationtest/IntegrationTestBase.java +++ b/inspectit-gepard-agent/src/test/java/rocks/inspectit/gepard/agent/integrationtest/IntegrationTestBase.java @@ -15,7 +15,6 @@ import java.util.Collections; import java.util.Map; import java.util.concurrent.TimeUnit; -import java.util.stream.Collectors; import java.util.stream.Stream; import java.util.stream.StreamSupport; import okhttp3.OkHttpClient; @@ -203,7 +202,7 @@ protected Collection waitForTraces() } return builder.build(); }) - .collect(Collectors.toList()); + .toList(); } /** @@ -225,7 +224,7 @@ protected Collection waitForMetrics() } return builder.build(); }) - .collect(Collectors.toList()); + .toList(); } /** diff --git a/inspectit-gepard-agent/src/test/java/rocks/inspectit/gepard/agent/integrationtest/spring/trace/TracingIntTest.java b/inspectit-gepard-agent/src/test/java/rocks/inspectit/gepard/agent/integrationtest/spring/trace/TracingIntTest.java index 68c9606..ac6cbe3 100644 --- a/inspectit-gepard-agent/src/test/java/rocks/inspectit/gepard/agent/integrationtest/spring/trace/TracingIntTest.java +++ b/inspectit-gepard-agent/src/test/java/rocks/inspectit/gepard/agent/integrationtest/spring/trace/TracingIntTest.java @@ -17,9 +17,9 @@ /** Should check, if traces are received in our tracing backend according to our configuration. */ class TracingIntTest extends SpringTestBase { - private static final String parentSpanName = "WebController.greeting"; + private static final String PARENT_SPAN_NAME = "WebController.greeting"; - private static final String childSpanName = "WebController.withSpan"; + private static final String CHILD_SPAN_NAME = "WebController.withSpan"; @Test void shouldSendSpansToBackendWhenScopesAreActive() throws Exception { @@ -30,7 +30,7 @@ void shouldSendSpansToBackendWhenScopesAreActive() throws Exception { sendRequestToTarget("/greeting"); Collection traces = waitForTraces(); - assertSpans(traces, parentSpanName, childSpanName); + assertSpans(traces, PARENT_SPAN_NAME, CHILD_SPAN_NAME); } @Test @@ -42,7 +42,7 @@ void shouldNotSendSpansToBackendWhenScopesAreInactive() throws Exception { sendRequestToTarget("/greeting"); Collection traces = waitForTraces(); - assertNoSpans(traces, parentSpanName, childSpanName); + assertNoSpans(traces, PARENT_SPAN_NAME, CHILD_SPAN_NAME); } /**