Skip to content

Commit

Permalink
fix sonarcloud issues
Browse files Browse the repository at this point in the history
  • Loading branch information
EddeCCC committed Nov 20, 2024
1 parent 83ed409 commit a4e9516
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -203,7 +202,7 @@ protected Collection<ExportTraceServiceRequest> waitForTraces()
}
return builder.build();
})
.collect(Collectors.toList());
.toList();
}

/**
Expand All @@ -225,7 +224,7 @@ protected Collection<ExportMetricsServiceRequest> waitForMetrics()
}
return builder.build();
})
.collect(Collectors.toList());
.toList();
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -30,7 +30,7 @@ void shouldSendSpansToBackendWhenScopesAreActive() throws Exception {
sendRequestToTarget("/greeting");
Collection<ExportTraceServiceRequest> traces = waitForTraces();

assertSpans(traces, parentSpanName, childSpanName);
assertSpans(traces, PARENT_SPAN_NAME, CHILD_SPAN_NAME);
}

@Test
Expand All @@ -42,7 +42,7 @@ void shouldNotSendSpansToBackendWhenScopesAreInactive() throws Exception {
sendRequestToTarget("/greeting");
Collection<ExportTraceServiceRequest> traces = waitForTraces();

assertNoSpans(traces, parentSpanName, childSpanName);
assertNoSpans(traces, PARENT_SPAN_NAME, CHILD_SPAN_NAME);
}

/**
Expand Down

0 comments on commit a4e9516

Please sign in to comment.