|
8 | 8 | import static io.opentelemetry.instrumentation.testing.util.TelemetryDataUtil.orderByRootSpanKind; |
9 | 9 | import static io.opentelemetry.sdk.testing.assertj.OpenTelemetryAssertions.assertThat; |
10 | 10 |
|
11 | | -import io.opentelemetry.api.common.AttributeKey; |
12 | 11 | import io.opentelemetry.api.trace.SpanKind; |
13 | 12 | import io.opentelemetry.instrumentation.kafkaclients.common.v0_11.internal.KafkaClientBaseTest; |
14 | 13 | import io.opentelemetry.instrumentation.kafkaclients.common.v0_11.internal.KafkaClientPropagationBaseTest; |
@@ -265,24 +264,14 @@ void testKafkaHeaderNull() throws Exception { |
265 | 264 | span.hasName(SHARED_TOPIC + " receive") |
266 | 265 | .hasKind(SpanKind.CONSUMER) |
267 | 266 | .hasNoParent() |
268 | | - .hasAttributesSatisfyingExactly(receiveAttributes(false)) |
269 | | - .hasAttributesSatisfying( |
270 | | - attrs -> |
271 | | - assertThat(attrs) |
272 | | - .doesNotContainKey( |
273 | | - AttributeKey.stringKey("test-message-header"))), |
| 267 | + .hasAttributesSatisfyingExactly(receiveAttributes(false)), |
274 | 268 | span -> |
275 | 269 | span.hasName(SHARED_TOPIC + " process") |
276 | 270 | .hasKind(SpanKind.CONSUMER) |
277 | 271 | .hasLinks(LinkData.create(producerSpan.get().getSpanContext())) |
278 | 272 | .hasParent(trace.getSpan(0)) |
279 | 273 | .hasAttributesSatisfyingExactly( |
280 | | - processAttributes("10", greeting, false, false)) |
281 | | - .hasAttributesSatisfying( |
282 | | - attrs -> |
283 | | - assertThat(attrs) |
284 | | - .doesNotContainKey( |
285 | | - AttributeKey.stringKey("test-message-header"))), |
| 274 | + processAttributes("10", greeting, false, false)), |
286 | 275 | span -> span.hasName("processing").hasParent(trace.getSpan(1)))); |
287 | 276 | } |
288 | 277 | } |
0 commit comments