|
4 | 4 | package com.microsoft.applicationinsights.agent.internal.init; |
5 | 5 |
|
6 | 6 | import static io.opentelemetry.api.trace.SpanKind.INTERNAL; |
| 7 | +import static io.opentelemetry.sdk.testing.assertj.OpenTelemetryAssertions.assertThat; |
7 | 8 | import static io.opentelemetry.sdk.testing.assertj.TracesAssert.assertThat; |
8 | 9 | import static org.assertj.core.api.Assertions.entry; |
9 | 10 | import static org.awaitility.Awaitility.await; |
|
14 | 15 | import io.opentelemetry.api.trace.Tracer; |
15 | 16 | import io.opentelemetry.context.Context; |
16 | 17 | import io.opentelemetry.sdk.OpenTelemetrySdk; |
17 | | -import io.opentelemetry.sdk.testing.assertj.OpenTelemetryAssertions; |
18 | 18 | import io.opentelemetry.sdk.testing.exporter.InMemorySpanExporter; |
19 | 19 | import io.opentelemetry.sdk.trace.SdkTracerProvider; |
20 | 20 | import io.opentelemetry.sdk.trace.export.SimpleSpanProcessor; |
@@ -61,7 +61,7 @@ public void shouldNotInheritAttribute() { |
61 | 61 | .hasKind(INTERNAL) |
62 | 62 | .hasAttributesSatisfying( |
63 | 63 | attributes -> |
64 | | - OpenTelemetryAssertions.assertThat(attributes) |
| 64 | + assertThat(attributes) |
65 | 65 | .containsOnly(entry(oneStringKey, "1"))))); |
66 | 66 | } |
67 | 67 |
|
@@ -93,15 +93,14 @@ public void shouldInheritAttribute() { |
93 | 93 | .hasKind(INTERNAL) |
94 | 94 | .hasAttributesSatisfying( |
95 | 95 | attributes -> |
96 | | - OpenTelemetryAssertions.assertThat(attributes) |
97 | | - .containsOnly(entry(oneStringKey, "1"))), |
| 96 | + assertThat(attributes).containsOnly(entry(oneStringKey, "1"))), |
98 | 97 | parentSpan -> |
99 | 98 | parentSpan |
100 | 99 | .hasName("parent") |
101 | 100 | .hasKind(INTERNAL) |
102 | 101 | .hasAttributesSatisfying( |
103 | 102 | attributes -> |
104 | | - OpenTelemetryAssertions.assertThat(attributes) |
| 103 | + assertThat(attributes) |
105 | 104 | .containsOnly(entry(oneStringKey, "1"))))); |
106 | 105 | } |
107 | 106 |
|
@@ -134,8 +133,7 @@ public void shouldNotInheritAttributeWithSameNameButDifferentType() { |
134 | 133 | .hasKind(INTERNAL) |
135 | 134 | .hasAttributesSatisfying( |
136 | 135 | attributes -> |
137 | | - OpenTelemetryAssertions.assertThat(attributes) |
138 | | - .containsOnly(entry(oneLongKey, 1L))))); |
| 136 | + assertThat(attributes).containsOnly(entry(oneLongKey, 1L))))); |
139 | 137 | } |
140 | 138 |
|
141 | 139 | private Tracer newTracer(List<Configuration.InheritedAttribute> inheritedAttributes) { |
|
0 commit comments