Skip to content

Commit ac63218

Browse files
committed
fixing vertx client test
1 parent 454379f commit ac63218

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

instrumentation/vertx/vertx-web-3.0/src/test/java/io/opentelemetry/javaagent/instrumentation/hypertrace/vertx/VertxClientInstrumentationPostTests.java

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,15 @@ public void postJson_write_end_string() throws TimeoutException, InterruptedExce
109109

110110
TEST_WRITER.waitForTraces(1);
111111
List<List<Span>> traces =
112-
TEST_WRITER.waitForSpans(1, span -> span.getKind().equals(Span.SpanKind.SPAN_KIND_SERVER));
112+
TEST_WRITER.waitForSpans(
113+
1,
114+
span ->
115+
!span.getKind().equals(Span.SpanKind.SPAN_KIND_CLIENT)
116+
|| span.getAttributesList().stream()
117+
.noneMatch(
118+
keyValue ->
119+
keyValue.getKey().equals("http.url")
120+
&& keyValue.getValue().getStringValue().contains("/echo")));
113121
Assertions.assertEquals(1, traces.size(), String.format("was: %d", traces.size()));
114122
Span clientSpan = traces.get(0).get(0);
115123
Assertions.assertEquals(

0 commit comments

Comments
 (0)