File tree Expand file tree Collapse file tree 5 files changed +18
-9
lines changed
tck/tracing/src/main/java/org/eclipse/microprofile/telemetry/tracing/tck/rest Expand file tree Collapse file tree 5 files changed +18
-9
lines changed Original file line number Diff line number Diff line change @@ -112,8 +112,11 @@ void b3MultiPropagation() {
112112 Assert .assertNull (server .getAttributes ().get (BAGGAGE_METADATA_ATTR ));
113113
114114 // Assert that the expected headers were used
115- Assert .assertTrue (server .getAttributes ().get (PROPAGATION_HEADERS_ATTR ).contains ("X-B3-TraceId" ));
116- Assert .assertTrue (server .getAttributes ().get (PROPAGATION_HEADERS_ATTR ).contains ("X-B3-SpanId" ));
117- Assert .assertTrue (server .getAttributes ().get (PROPAGATION_HEADERS_ATTR ).contains ("X-B3-Sampled" ));
115+ Assert .assertTrue (server .getAttributes ().get (PROPAGATION_HEADERS_ATTR ).stream ()
116+ .anyMatch (x -> x .equalsIgnoreCase ("X-B3-TraceId" )));
117+ Assert .assertTrue (server .getAttributes ().get (PROPAGATION_HEADERS_ATTR ).stream ()
118+ .anyMatch (x -> x .equalsIgnoreCase ("X-B3-SpanId" )));
119+ Assert .assertTrue (server .getAttributes ().get (PROPAGATION_HEADERS_ATTR ).stream ()
120+ .anyMatch (x -> x .equalsIgnoreCase ("X-B3-Sampled" )));
118121 }
119122}
Original file line number Diff line number Diff line change @@ -111,7 +111,8 @@ void b3Propagation() {
111111
112112 // Assert that the expected headers were used
113113 Assert .assertTrue (
114- server .getAttributes ().get (AttributeKey .stringArrayKey ("test.propagation.headers" )).contains ("b3" ));
114+ server .getAttributes ().get (AttributeKey .stringArrayKey ("test.propagation.headers" )).stream ()
115+ .anyMatch (x -> x .equalsIgnoreCase ("b3" )));
115116
116117 }
117118}
Original file line number Diff line number Diff line change @@ -112,7 +112,9 @@ void jaegerPropagation() {
112112 Assert .assertEquals (server .getAttributes ().get (BAGGAGE_METADATA_ATTR ), "" );
113113
114114 // assert that the expected headers were used
115- Assert .assertTrue (server .getAttributes ().get (PROPAGATION_HEADERS_ATTR ).contains ("uber-trace-id" ));
116- Assert .assertTrue (server .getAttributes ().get (PROPAGATION_HEADERS_ATTR ).contains ("uberctx-" + BAGGAGE_KEY ));
115+ Assert .assertTrue (server .getAttributes ().get (PROPAGATION_HEADERS_ATTR ).stream ()
116+ .anyMatch (x -> x .equalsIgnoreCase ("uber-trace-id" )));
117+ Assert .assertTrue (server .getAttributes ().get (PROPAGATION_HEADERS_ATTR ).stream ()
118+ .anyMatch (x -> x .equalsIgnoreCase ("uberctx-" + BAGGAGE_KEY )));
117119 }
118120}
Original file line number Diff line number Diff line change @@ -111,7 +111,9 @@ void span() {
111111 Assert .assertEquals (server .getAttributes ().get (BAGGAGE_METADATA_ATTR ), BAGGAGE_METADATA );
112112
113113 // Assert that the expected headers were used
114- Assert .assertTrue (server .getAttributes ().get (PROPAGATION_HEADERS_ATTR ).contains ("traceparent" ));
115- Assert .assertTrue (server .getAttributes ().get (PROPAGATION_HEADERS_ATTR ).contains ("baggage" ));
114+ Assert .assertTrue (server .getAttributes ().get (PROPAGATION_HEADERS_ATTR ).stream ()
115+ .anyMatch (x -> x .equalsIgnoreCase ("traceparent" )));
116+ Assert .assertTrue (server .getAttributes ().get (PROPAGATION_HEADERS_ATTR ).stream ()
117+ .anyMatch (x -> x .equalsIgnoreCase ("baggage" )));
116118 }
117119}
Original file line number Diff line number Diff line change @@ -112,6 +112,7 @@ void span() {
112112 Assert .assertNull (server .getAttributes ().get (BAGGAGE_METADATA_ATTR ));
113113
114114 // Assert that the expected headers were used
115- Assert .assertTrue (server .getAttributes ().get (PROPAGATION_HEADERS_ATTR ).contains ("traceparent" ));
115+ Assert .assertTrue (server .getAttributes ().get (PROPAGATION_HEADERS_ATTR ).stream ()
116+ .anyMatch (x -> x .equalsIgnoreCase ("traceparent" )));
116117 }
117118}
You can’t perform that action at this time.
0 commit comments