Skip to content

Commit

Permalink
Added tests to validate the correct propagators are added
Browse files Browse the repository at this point in the history
  • Loading branch information
tomas-langer committed Apr 12, 2023
1 parent 6f2cc4d commit da1c5f2
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,14 @@
import io.helidon.tracing.Tracer;
import io.helidon.tracing.TracerBuilder;

import io.opentelemetry.api.baggage.propagation.W3CBaggagePropagator;
import io.opentelemetry.context.propagation.TextMapPropagator;
import io.opentelemetry.extension.trace.propagation.B3Propagator;
import io.opentelemetry.extension.trace.propagation.JaegerPropagator;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;

import static org.hamcrest.CoreMatchers.instanceOf;
import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.CoreMatchers.nullValue;
import static org.hamcrest.CoreMatchers.sameInstance;
Expand Down Expand Up @@ -110,5 +114,9 @@ void testFullHttp() {

List<TextMapPropagator> propagators = jBuilder.createPropagators();
assertThat(propagators, hasSize(3));

assertThat(propagators.get(0), instanceOf(B3Propagator.class));
assertThat(propagators.get(1), instanceOf(JaegerPropagator.class));
assertThat(propagators.get(2), instanceOf(W3CBaggagePropagator.class));
}
}

0 comments on commit da1c5f2

Please sign in to comment.