diff options
author | Ivan Topolnjak <ivantopo@gmail.com> | 2017-06-06 14:15:15 +0200 |
---|---|---|
committer | Ivan Topolnjak <ivantopo@gmail.com> | 2017-06-06 14:15:15 +0200 |
commit | c52f8eaca0d1ccc4c992cba039e35e099b5b478b (patch) | |
tree | f9e78e2f929627e7547bef39fdf6cbcd544cb8d8 /kamon-core/src/legacy-test/scala/kamon/trace/logging/MdcKeysSupportSpec.scala | |
parent | 1f5d9876dedb715ae1c31203ea4f15ebf031612c (diff) | |
download | Kamon-c52f8eaca0d1ccc4c992cba039e35e099b5b478b.tar.gz Kamon-c52f8eaca0d1ccc4c992cba039e35e099b5b478b.tar.bz2 Kamon-c52f8eaca0d1ccc4c992cba039e35e099b5b478b.zip |
make it compile for Scala 2.11 and 2.12
Diffstat (limited to 'kamon-core/src/legacy-test/scala/kamon/trace/logging/MdcKeysSupportSpec.scala')
-rw-r--r-- | kamon-core/src/legacy-test/scala/kamon/trace/logging/MdcKeysSupportSpec.scala | 44 |
1 files changed, 0 insertions, 44 deletions
diff --git a/kamon-core/src/legacy-test/scala/kamon/trace/logging/MdcKeysSupportSpec.scala b/kamon-core/src/legacy-test/scala/kamon/trace/logging/MdcKeysSupportSpec.scala deleted file mode 100644 index 39374e79..00000000 --- a/kamon-core/src/legacy-test/scala/kamon/trace/logging/MdcKeysSupportSpec.scala +++ /dev/null @@ -1,44 +0,0 @@ -package kamon.trace.logging - -import kamon.testkit.BaseKamonSpec -import kamon.trace.{EmptyTraceContext, Tracer} -import org.slf4j.MDC - -class MdcKeysSupportSpec extends BaseKamonSpec("mdc-keys-support-spec") { - - "Running code with MDC support" should { - "add nothing to the MDC" when { - "the trace context is empty" in { - // Given an empty trace context. - Tracer.withContext(EmptyTraceContext) { - // When some code is executed with MDC support. - MdcKeysSupport.withMdc { - // Then the MDC should not contain the trace token. - Option(MDC.get(MdcKeysSupport.traceTokenKey)) should be(None) - // Or name - Option(MDC.get(MdcKeysSupport.traceNameKey)) should be(None) - } - } - } - } - "add the trace token and name to the context" when { - "the trace context is not empty" in { - // Given a trace context. - Tracer.withNewContext("name", Some("token")) { - // When some code is executed with MDC support. - MdcKeysSupport.withMdc { - // Then the MDC should contain the trace token. - Option(MDC.get(MdcKeysSupport.traceTokenKey)) should be(Some("token")) - // And name - Option(MDC.get(MdcKeysSupport.traceNameKey)) should be(Some("name")) - } - - // Then after code is executed the MDC should have been cleared. - Option(MDC.get(MdcKeysSupport.traceTokenKey)) should be(None) - Option(MDC.get(MdcKeysSupport.traceNameKey)) should be(None) - } - } - } - } - -} |