Skip to content

Commit

Permalink
Merge pull request #27230 from radcortez/otel-test-failing
Browse files Browse the repository at this point in the history
Add debug information to OTel flaky test
  • Loading branch information
gsmet authored Aug 10, 2022
2 parents 99269bd + 5aa608d commit dc89f85
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import static org.hamcrest.Matchers.equalTo;
import static org.junit.jupiter.api.Assertions.*;

import java.util.Collections;
import java.util.List;
import java.util.Locale;
import java.util.Map;
Expand All @@ -30,7 +31,10 @@

import io.opentelemetry.instrumentation.api.instrumenter.messaging.MessageOperation;
import io.quarkus.test.junit.QuarkusTest;
import io.restassured.RestAssured;
import io.restassured.common.mapper.TypeRef;
import io.restassured.filter.log.RequestLoggingFilter;
import io.restassured.filter.log.ResponseLoggingFilter;
import io.restassured.http.ContentType;
import io.vertx.core.http.HttpMethod;

Expand Down Expand Up @@ -119,7 +123,9 @@ void bus() {
assertEquals("hello to bus", messages.get(0));

await().atMost(5, TimeUnit.SECONDS).until(() -> getSpans().size() == 3);
RestAssured.filters(new RequestLoggingFilter(), new ResponseLoggingFilter());
List<Map<String, Object>> spans = getSpans();
RestAssured.replaceFiltersWith(Collections.emptyList());
assertEquals(3, spans.size());

assertEquals(spans.get(0).get("traceId"), spans.get(1).get("traceId"));
Expand Down

0 comments on commit dc89f85

Please sign in to comment.