diff --git a/instrumentation/vertx/vertx-web-3.0/src/test/java/io/opentelemetry/javaagent/instrumentation/hypertrace/vertx/VertxClientInstrumentationPostTests.java b/instrumentation/vertx/vertx-web-3.0/src/test/java/io/opentelemetry/javaagent/instrumentation/hypertrace/vertx/VertxClientInstrumentationPostTests.java index 737e7a81..1b504c7d 100644 --- a/instrumentation/vertx/vertx-web-3.0/src/test/java/io/opentelemetry/javaagent/instrumentation/hypertrace/vertx/VertxClientInstrumentationPostTests.java +++ b/instrumentation/vertx/vertx-web-3.0/src/test/java/io/opentelemetry/javaagent/instrumentation/hypertrace/vertx/VertxClientInstrumentationPostTests.java @@ -109,7 +109,15 @@ public void postJson_write_end_string() throws TimeoutException, InterruptedExce TEST_WRITER.waitForTraces(1); List> traces = - TEST_WRITER.waitForSpans(1, span -> span.getKind().equals(Span.SpanKind.SPAN_KIND_SERVER)); + TEST_WRITER.waitForSpans( + 1, + span -> + !span.getKind().equals(Span.SpanKind.SPAN_KIND_CLIENT) + || span.getAttributesList().stream() + .noneMatch( + keyValue -> + keyValue.getKey().equals("http.url") + && keyValue.getValue().getStringValue().contains("/echo"))); Assertions.assertEquals(1, traces.size(), String.format("was: %d", traces.size())); Span clientSpan = traces.get(0).get(0); Assertions.assertEquals(