aboutsummaryrefslogtreecommitdiff
path: root/kamon-core/src/test/scala/kamon/instrumentation/MessageQueueInstrumentationSpec.scala
diff options
context:
space:
mode:
authorIvan Topolnak <ivantopo@gmail.com>2013-11-05 18:38:39 -0300
committerIvan Topolnak <ivantopo@gmail.com>2013-11-05 18:38:39 -0300
commit2b63540e5fffab545d0846cfb3dab5c0e1d0c9e1 (patch)
tree56c4ad1f025c9144376cd4463ad4d4a23e37b571 /kamon-core/src/test/scala/kamon/instrumentation/MessageQueueInstrumentationSpec.scala
parent5127c3bb83cd6fe90e071720d995cfb53d913e6a (diff)
downloadKamon-2b63540e5fffab545d0846cfb3dab5c0e1d0c9e1.tar.gz
Kamon-2b63540e5fffab545d0846cfb3dab5c0e1d0c9e1.tar.bz2
Kamon-2b63540e5fffab545d0846cfb3dab5c0e1d0c9e1.zip
basic separation of concerns between sub-projects
Diffstat (limited to 'kamon-core/src/test/scala/kamon/instrumentation/MessageQueueInstrumentationSpec.scala')
-rw-r--r--kamon-core/src/test/scala/kamon/instrumentation/MessageQueueInstrumentationSpec.scala53
1 files changed, 0 insertions, 53 deletions
diff --git a/kamon-core/src/test/scala/kamon/instrumentation/MessageQueueInstrumentationSpec.scala b/kamon-core/src/test/scala/kamon/instrumentation/MessageQueueInstrumentationSpec.scala
deleted file mode 100644
index cc55ec92..00000000
--- a/kamon-core/src/test/scala/kamon/instrumentation/MessageQueueInstrumentationSpec.scala
+++ /dev/null
@@ -1,53 +0,0 @@
-package kamon.instrumentation
-
-import org.scalatest.WordSpec
-import com.codahale.metrics.{ExponentiallyDecayingReservoir, Histogram}
-import java.util.concurrent.ConcurrentLinkedQueue
-import akka.dispatch.{UnboundedMessageQueueSemantics, QueueBasedMessageQueue, Envelope}
-import java.util.Queue
-import akka.actor.{ActorSystem, Actor}
-
-class MessageQueueInstrumentationSpec(val actorSystem: ActorSystem) extends WordSpec {
- def this() = this(ActorSystem("MessageQueueInstrumentationSpec"))
-
-
- /*"A MonitoredMessageQueue" should {
- "update the related histogram when a message is enqueued" in {
- new PopulatedMessageQueueFixture {
-
- assert(histogram.getSnapshot.getMax === 0)
-
- for(i <- 1 to 3) { enqueueDummyMessage }
-
- assert(histogram.getCount === 3)
- assert(histogram.getSnapshot.getMax === 3)
- assert(histogram.getSnapshot.getMin === 1)
- }
- }
-
- "update the related histogram when a message is dequeued" in {
- new PopulatedMessageQueueFixture {
- for(i <- 1 to 3) { enqueueDummyMessage }
- assert(histogram.getSnapshot.getMax === 3)
-
- messageQueue.dequeue()
- messageQueue.dequeue()
-
- assert(histogram.getCount === 5)
- assert(histogram.getSnapshot.getMax === 3)
- assert(histogram.getSnapshot.getMin === 1)
- }
- }
- }
-
- trait PopulatedMessageQueueFixture {
-
- val histogram = new Histogram(new ExponentiallyDecayingReservoir())
-/* val delegate = new ConcurrentLinkedQueue[Envelope]() with QueueBasedMessageQueue with UnboundedMessageQueueSemantics {
- final def queue: Queue[Envelope] = this
- }*/
- val messageQueue = new MonitoredMessageQueue(delegate, histogram)
-
- def enqueueDummyMessage = messageQueue.enqueue(Actor.noSender, Envelope("", Actor.noSender, actorSystem))
- }*/
-}