Skip to content

Commit f54a4dd

Browse files
committed
fix deprecations
1 parent d8ef322 commit f54a4dd

1 file changed

Lines changed: 5 additions & 7 deletions

File tree

agent/agent-tooling/src/test/java/com/microsoft/applicationinsights/agent/internal/init/InheritedAttributesSpanProcessorTest.java

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
package com.microsoft.applicationinsights.agent.internal.init;
55

66
import static io.opentelemetry.api.trace.SpanKind.INTERNAL;
7+
import static io.opentelemetry.sdk.testing.assertj.OpenTelemetryAssertions.assertThat;
78
import static io.opentelemetry.sdk.testing.assertj.TracesAssert.assertThat;
89
import static org.assertj.core.api.Assertions.entry;
910
import static org.awaitility.Awaitility.await;
@@ -14,7 +15,6 @@
1415
import io.opentelemetry.api.trace.Tracer;
1516
import io.opentelemetry.context.Context;
1617
import io.opentelemetry.sdk.OpenTelemetrySdk;
17-
import io.opentelemetry.sdk.testing.assertj.OpenTelemetryAssertions;
1818
import io.opentelemetry.sdk.testing.exporter.InMemorySpanExporter;
1919
import io.opentelemetry.sdk.trace.SdkTracerProvider;
2020
import io.opentelemetry.sdk.trace.export.SimpleSpanProcessor;
@@ -61,7 +61,7 @@ public void shouldNotInheritAttribute() {
6161
.hasKind(INTERNAL)
6262
.hasAttributesSatisfying(
6363
attributes ->
64-
OpenTelemetryAssertions.assertThat(attributes)
64+
assertThat(attributes)
6565
.containsOnly(entry(oneStringKey, "1")))));
6666
}
6767

@@ -93,15 +93,14 @@ public void shouldInheritAttribute() {
9393
.hasKind(INTERNAL)
9494
.hasAttributesSatisfying(
9595
attributes ->
96-
OpenTelemetryAssertions.assertThat(attributes)
97-
.containsOnly(entry(oneStringKey, "1"))),
96+
assertThat(attributes).containsOnly(entry(oneStringKey, "1"))),
9897
parentSpan ->
9998
parentSpan
10099
.hasName("parent")
101100
.hasKind(INTERNAL)
102101
.hasAttributesSatisfying(
103102
attributes ->
104-
OpenTelemetryAssertions.assertThat(attributes)
103+
assertThat(attributes)
105104
.containsOnly(entry(oneStringKey, "1")))));
106105
}
107106

@@ -134,8 +133,7 @@ public void shouldNotInheritAttributeWithSameNameButDifferentType() {
134133
.hasKind(INTERNAL)
135134
.hasAttributesSatisfying(
136135
attributes ->
137-
OpenTelemetryAssertions.assertThat(attributes)
138-
.containsOnly(entry(oneLongKey, 1L)))));
136+
assertThat(attributes).containsOnly(entry(oneLongKey, 1L)))));
139137
}
140138

141139
private Tracer newTracer(List<Configuration.InheritedAttribute> inheritedAttributes) {

0 commit comments

Comments
 (0)