diff options
author | Ivan Topolnak <ivantopo@gmail.com> | 2013-08-12 19:00:49 -0300 |
---|---|---|
committer | Ivan Topolnak <ivantopo@gmail.com> | 2013-08-12 19:00:49 -0300 |
commit | 18656c723881ebfd8ade43a990fe73beba5690d0 (patch) | |
tree | 34b563bc5f8913f054df15dad47a8d8e4b5b0e36 /kamon-core/src/test/scala/kamon/instrumentation | |
parent | 66957f2632eaccae4e3a354b8787fded8c6369d2 (diff) | |
download | Kamon-18656c723881ebfd8ade43a990fe73beba5690d0.tar.gz Kamon-18656c723881ebfd8ade43a990fe73beba5690d0.tar.bz2 Kamon-18656c723881ebfd8ade43a990fe73beba5690d0.zip |
fixed the instrumentation to work nicely with spray
Diffstat (limited to 'kamon-core/src/test/scala/kamon/instrumentation')
-rw-r--r-- | kamon-core/src/test/scala/kamon/instrumentation/RunnableInstrumentationSpec.scala | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/kamon-core/src/test/scala/kamon/instrumentation/RunnableInstrumentationSpec.scala b/kamon-core/src/test/scala/kamon/instrumentation/RunnableInstrumentationSpec.scala index de65aaca..fe89695b 100644 --- a/kamon-core/src/test/scala/kamon/instrumentation/RunnableInstrumentationSpec.scala +++ b/kamon-core/src/test/scala/kamon/instrumentation/RunnableInstrumentationSpec.scala @@ -3,7 +3,7 @@ package kamon.instrumentation import scala.concurrent.{Await, Promise, Future} import org.scalatest.{Matchers, OptionValues, WordSpec} import org.scalatest.concurrent.{ScalaFutures, PatienceConfiguration} -import kamon.{Kamon, TraceContext} +import kamon.{Tracer, Kamon, TraceContext} import java.util.UUID import scala.util.Success import scala.concurrent.duration._ @@ -27,7 +27,7 @@ class RunnableInstrumentationSpec extends WordSpec with Matchers with ScalaFutur val onCompleteContext = Promise[TraceContext]() futureWithContext.onComplete({ - case _ => onCompleteContext.complete(Success(Kamon.context.get)) + case _ => onCompleteContext.complete(Success(Tracer.context.get)) }) whenReady(onCompleteContext.future) { result => @@ -49,7 +49,7 @@ class RunnableInstrumentationSpec extends WordSpec with Matchers with ScalaFutur val onCompleteContext = Promise[Option[TraceContext]]() futureWithoutContext.onComplete({ - case _ => onCompleteContext.complete(Success(Kamon.context)) + case _ => onCompleteContext.complete(Success(Tracer.context)) }) whenReady(onCompleteContext.future) { result => @@ -68,14 +68,14 @@ class RunnableInstrumentationSpec extends WordSpec with Matchers with ScalaFutur class FutureWithContextFixture { val testContext = TraceContext() - Kamon.set(testContext) + Tracer.set(testContext) - val futureWithContext = Future { Kamon.context} + val futureWithContext = Future { Tracer.context} } trait FutureWithoutContextFixture { - Kamon.clear // Make sure no TraceContext is available - val futureWithoutContext = Future { Kamon.context } + Tracer.clear // Make sure no TraceContext is available + val futureWithoutContext = Future { Tracer.context } } } |