diff options
author | Ivan Topolnak <ivantopo@gmail.com> | 2013-07-15 18:14:07 -0300 |
---|---|---|
committer | Ivan Topolnak <ivantopo@gmail.com> | 2013-07-15 18:14:07 -0300 |
commit | afda5a6ac02a5cd314638e40250b49f66cf3b419 (patch) | |
tree | d0f2337f570d883497e78c482629f2af60c95366 /src/test | |
parent | e8dd6c83986f1ecd2d717c39bffe900b23b68854 (diff) | |
download | Kamon-afda5a6ac02a5cd314638e40250b49f66cf3b419.tar.gz Kamon-afda5a6ac02a5cd314638e40250b49f66cf3b419.tar.bz2 Kamon-afda5a6ac02a5cd314638e40250b49f66cf3b419.zip |
still a disaster, need to sync
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/scala/kamon/instrumentation/ActorSystemInstrumentationSpec.scala | 23 | ||||
-rw-r--r-- | src/test/scala/kamon/instrumentation/DispatcherInstrumentationSpec.scala | 6 |
2 files changed, 23 insertions, 6 deletions
diff --git a/src/test/scala/kamon/instrumentation/ActorSystemInstrumentationSpec.scala b/src/test/scala/kamon/instrumentation/ActorSystemInstrumentationSpec.scala new file mode 100644 index 00000000..489f3c1c --- /dev/null +++ b/src/test/scala/kamon/instrumentation/ActorSystemInstrumentationSpec.scala @@ -0,0 +1,23 @@ +package kamon.instrumentation + +import org.scalatest.{Matchers, WordSpec} +import akka.actor.ActorSystem +import kamon.Kamon + +class ActorSystemInstrumentationSpec extends WordSpec with Matchers { + + // TODO: Selection filters to exclude unwanted actor systems. Read from configuration. + + "the actor system instrumentation" should { + "register all actor systems created" in { + val as1 = ActorSystem("as1") + val as2 = ActorSystem("as2") + + + Kamon.Metric.actorSystem("as1") should not be (None) + Kamon.Metric.actorSystem("as2") should not be (None) + /*assert(Kamon.Metric.actorSystem("as2") != null) + assert(Kamon.Metric.actorSystem("as3") === null)*/ + } + } +} diff --git a/src/test/scala/kamon/instrumentation/DispatcherInstrumentationSpec.scala b/src/test/scala/kamon/instrumentation/DispatcherInstrumentationSpec.scala index 517a4ce0..d72989f6 100644 --- a/src/test/scala/kamon/instrumentation/DispatcherInstrumentationSpec.scala +++ b/src/test/scala/kamon/instrumentation/DispatcherInstrumentationSpec.scala @@ -5,16 +5,10 @@ import akka.actor.ActorSystem import kamon.metric.MetricDirectory class DispatcherInstrumentationSpec extends WordSpec with Matchers{ - import MetricDirectory.dispatcherStats "the dispatcher instrumentation" should { "instrument a dispatcher that belongs to a non-filtered actor system" in { - val defaultDispatcherStats = dispatcherStats("single-dispatcher", "akka.actor.default-dispatcher") - - defaultDispatcherStats should not be None - - //KamonMetrics.watch[Actor] named "ivan" } } |