aboutsummaryrefslogtreecommitdiff
path: root/src/test/scala/akka/instrumentation/ActorInstrumentationSpec.scala
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/scala/akka/instrumentation/ActorInstrumentationSpec.scala')
-rw-r--r--src/test/scala/akka/instrumentation/ActorInstrumentationSpec.scala42
1 files changed, 0 insertions, 42 deletions
diff --git a/src/test/scala/akka/instrumentation/ActorInstrumentationSpec.scala b/src/test/scala/akka/instrumentation/ActorInstrumentationSpec.scala
deleted file mode 100644
index 4cc15a2f..00000000
--- a/src/test/scala/akka/instrumentation/ActorInstrumentationSpec.scala
+++ /dev/null
@@ -1,42 +0,0 @@
-package akka.instrumentation
-
-import org.scalatest.WordSpec
-import org.scalatest.matchers.{ShouldMatchers, MustMatchers}
-import akka.actor.{Actor, Props, ActorSystem}
-import kamon.metric.Metrics._
-import scala.collection.JavaConverters._
-
-
-class ActorInstrumentationSpec extends WordSpec with MustMatchers with ShouldMatchers {
- val system = ActorSystem()
- import system._
-
- val echoRef = actorOf(Props(new EchoActor), "Echo-Actor")
- val meterForEchoActor = "meter-for-akka://default/user/Echo-Actor"
- val totalMessages = 1000
-
- "an instrumented Actor" should {
- "send a message and record a metric on the Metrics Registry with the number of sent messages" in {
-
- (1 to totalMessages).foreach {x:Int =>
- echoRef ! s"Message ${x}"
- }
-
- //to ensure that all messages was received
- Thread.sleep(1000)
-
- val messages = metricsRegistry.getMeters.asScala.get(meterForEchoActor).get.getCount
-
- messages should equal(totalMessages)
- }
- }
-
-}
-
-class EchoActor extends Actor {
- def receive = {
- case msg ⇒ sender ! msg
- }
-}
-
-