From 91575b8db60ca4fc6df9f44fa720929d8c3868ac Mon Sep 17 00:00:00 2001 From: Ivan Topolnjak Date: Mon, 25 Feb 2019 00:21:40 +0100 Subject: use TagSet as the implementation for Context tags --- .../instrumentation/HttpServerInstrumentationSpec.scala | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'kamon-core-tests/src/test/scala/kamon/instrumentation/HttpServerInstrumentationSpec.scala') diff --git a/kamon-core-tests/src/test/scala/kamon/instrumentation/HttpServerInstrumentationSpec.scala b/kamon-core-tests/src/test/scala/kamon/instrumentation/HttpServerInstrumentationSpec.scala index 62eae45b..c7e856d0 100644 --- a/kamon-core-tests/src/test/scala/kamon/instrumentation/HttpServerInstrumentationSpec.scala +++ b/kamon-core-tests/src/test/scala/kamon/instrumentation/HttpServerInstrumentationSpec.scala @@ -4,6 +4,7 @@ import java.time.Duration import kamon.context.Context import kamon.metric.{Counter, Histogram, RangeSampler} +import kamon.tag.Lookups._ import kamon.testkit.{MetricInspection, SpanInspection} import org.scalatest.concurrent.Eventually import org.scalatest.{Matchers, OptionValues, WordSpec} @@ -20,10 +21,8 @@ class HttpServerInstrumentationSpec extends WordSpec with Matchers with SpanInsp "custom-trace-id" -> "0011223344556677" ))) - handler.context.tags should contain only( - "tag" -> "value", - "none" -> "0011223344556677" - ) + handler.context.tags.get(plain("tag")) shouldBe "value" + handler.context.tags.get(plain("none")) shouldBe "0011223344556677" handler.send(fakeResponse(200, mutable.Map.empty), Context.Empty) handler.doneSending(0L) @@ -35,10 +34,8 @@ class HttpServerInstrumentationSpec extends WordSpec with Matchers with SpanInsp "custom-trace-id" -> "0011223344556677" ))) - handler.context.tags should contain only( - "tag" -> "value", - "none" -> "0011223344556677" - ) + handler.context.tags.get(plain("tag")) shouldBe "value" + handler.context.tags.get(plain("none")) shouldBe "0011223344556677" val span = inspect(handler.span) span.context().traceID.string shouldNot be("0011223344556677") -- cgit v1.2.3