diff options
author | Ivan Topolnjak <ivantopo@gmail.com> | 2014-10-19 22:39:24 +0200 |
---|---|---|
committer | Ivan Topolnjak <ivantopo@gmail.com> | 2014-10-19 22:39:24 +0200 |
commit | 51def4163a909bd4677795741f844fc757e1004e (patch) | |
tree | 96bab4bcbeb4902a7762600723bb9b86aab1ddec /kamon-core/src/test/scala/kamon/instrumentation/akka | |
parent | 4963b33e9c66cca8326d09537abce1ab2078ee9c (diff) | |
download | Kamon-51def4163a909bd4677795741f844fc757e1004e.tar.gz Kamon-51def4163a909bd4677795741f844fc757e1004e.tar.bz2 Kamon-51def4163a909bd4677795741f844fc757e1004e.zip |
= core: use explicitly thrown exceptions for failure tests.
Diffstat (limited to 'kamon-core/src/test/scala/kamon/instrumentation/akka')
2 files changed, 2 insertions, 2 deletions
diff --git a/kamon-core/src/test/scala/kamon/instrumentation/akka/ActorSystemMessageInstrumentationSpec.scala b/kamon-core/src/test/scala/kamon/instrumentation/akka/ActorSystemMessageInstrumentationSpec.scala index 47867c55..cb39f5e6 100644 --- a/kamon-core/src/test/scala/kamon/instrumentation/akka/ActorSystemMessageInstrumentationSpec.scala +++ b/kamon-core/src/test/scala/kamon/instrumentation/akka/ActorSystemMessageInstrumentationSpec.scala @@ -142,7 +142,7 @@ class ActorSystemMessageInstrumentationSpec extends TestKit(ActorSystem("actor-s class Child extends Actor { def receive = { - case "fail" ⇒ 1 / 0 + case "fail" ⇒ throw new ArithmeticException("Division by zero.") case "context" ⇒ sender ! TraceRecorder.currentContext } diff --git a/kamon-core/src/test/scala/kamon/instrumentation/akka/RemotingInstrumentationSpec.scala b/kamon-core/src/test/scala/kamon/instrumentation/akka/RemotingInstrumentationSpec.scala index bc864455..5ce90047 100644 --- a/kamon-core/src/test/scala/kamon/instrumentation/akka/RemotingInstrumentationSpec.scala +++ b/kamon-core/src/test/scala/kamon/instrumentation/akka/RemotingInstrumentationSpec.scala @@ -124,7 +124,7 @@ class TraceTokenReplier(creationTraceContextListener: Option[ActorRef]) extends def receive = { case "fail" ⇒ - 1 / 0 + throw new ArithmeticException("Division by zero.") case "reply-trace-token" ⇒ log.info("Sending back the TT: " + TraceRecorder.currentContext.map(_.token).getOrElse("unavailable")) sender ! currentTraceContextInfo |