diff options
author | Ivan Topolnjak <ivantopo@gmail.com> | 2017-07-20 08:45:41 +0200 |
---|---|---|
committer | Ivan Topolnjak <ivantopo@gmail.com> | 2017-07-20 08:45:49 +0200 |
commit | ed10612af5e6414f38feeb1e92d68a80b62dc0b1 (patch) | |
tree | 776cb0041b5f967bf0ef85f18e680e7b73e6ddad /kamon-core/src/test | |
parent | 450978b92bc968bfdb9c6470028ad30586433609 (diff) | |
download | Kamon-ed10612af5e6414f38feeb1e92d68a80b62dc0b1.tar.gz Kamon-ed10612af5e6414f38feeb1e92d68a80b62dc0b1.tar.bz2 Kamon-ed10612af5e6414f38feeb1e92d68a80b62dc0b1.zip |
test EmptySpanContext injection on the ExtendedB3 codec
Diffstat (limited to 'kamon-core/src/test')
-rw-r--r-- | kamon-core/src/test/scala/kamon/trace/ExtendedB3SpanContextCodecSpec.scala | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/kamon-core/src/test/scala/kamon/trace/ExtendedB3SpanContextCodecSpec.scala b/kamon-core/src/test/scala/kamon/trace/ExtendedB3SpanContextCodecSpec.scala index a11aaa4b..24cb7ef5 100644 --- a/kamon-core/src/test/scala/kamon/trace/ExtendedB3SpanContextCodecSpec.scala +++ b/kamon-core/src/test/scala/kamon/trace/ExtendedB3SpanContextCodecSpec.scala @@ -54,6 +54,11 @@ class ExtendedB3SpanContextCodecSpec extends WordSpecLike with Matchers with Opt textMap.get("X-B3-Extra-Baggage").value shouldBe "some=baggage;more=baggage" } + "not inject anything if the SpanContext is empty" in { + val textMap = extendedB3Codec.inject(SpanContext.EmptySpanContext) + textMap.values shouldBe empty + } + "extract a SpanContext from a TextMap when all fields are set" in { val textMap = TextMap.Default() textMap.put("X-B3-TraceId", "1234") |