diff options
author | Ivan Topolnjak <ivantopo@gmail.com> | 2013-11-25 02:23:34 -0300 |
---|---|---|
committer | Ivan Topolnjak <ivantopo@gmail.com> | 2013-11-25 02:23:34 -0300 |
commit | 0ffbf436a7d9d69c2292c9892e740b592dc8d85e (patch) | |
tree | 929edd0c6724d7698109645c02362e45f1e78a0b /kamon-trace/src/test/scala/kamon/trace/instrumentation/ActorLoggingSpec.scala | |
parent | 1e7a60be32b42df1669933ca40bb8d47740fe90d (diff) | |
download | Kamon-0ffbf436a7d9d69c2292c9892e740b592dc8d85e.tar.gz Kamon-0ffbf436a7d9d69c2292c9892e740b592dc8d85e.tar.bz2 Kamon-0ffbf436a7d9d69c2292c9892e740b592dc8d85e.zip |
better test for actor logging
Diffstat (limited to 'kamon-trace/src/test/scala/kamon/trace/instrumentation/ActorLoggingSpec.scala')
-rw-r--r-- | kamon-trace/src/test/scala/kamon/trace/instrumentation/ActorLoggingSpec.scala | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/kamon-trace/src/test/scala/kamon/trace/instrumentation/ActorLoggingSpec.scala b/kamon-trace/src/test/scala/kamon/trace/instrumentation/ActorLoggingSpec.scala index 896faf69..a11a88c8 100644 --- a/kamon-trace/src/test/scala/kamon/trace/instrumentation/ActorLoggingSpec.scala +++ b/kamon-trace/src/test/scala/kamon/trace/instrumentation/ActorLoggingSpec.scala @@ -18,10 +18,12 @@ class ActorLoggingSpec extends TestKit(ActorSystem("actor-logging-spec")) with W loggerActor ! "info" } - expectMsgPF() { - case event: LogEvent => + fishForMessage() { + case event: LogEvent if event.message.toString contains "TraceContext =>" => val ctxInEvent = event.asInstanceOf[ContextAware].traceContext - ctxInEvent should equal(testTraceContext) + ctxInEvent === testTraceContext + + case event: LogEvent => false } } } |