diff options
author | Ivan Topolnak <itopolnak@despegar.com> | 2014-04-09 17:39:43 -0300 |
---|---|---|
committer | Ivan Topolnak <itopolnak@despegar.com> | 2014-04-09 17:39:43 -0300 |
commit | 42e23d23ba64f570ad613bca26d930727cd77dde (patch) | |
tree | 7d1f14604f899c51392ed47aa7553ebf156c2dbe /kamon-core/src/test/scala/kamon | |
parent | e201e684fdc7fcf7aef090757e2690c538e75e07 (diff) | |
download | Kamon-42e23d23ba64f570ad613bca26d930727cd77dde.tar.gz Kamon-42e23d23ba64f570ad613bca26d930727cd77dde.tar.bz2 Kamon-42e23d23ba64f570ad613bca26d930727cd77dde.zip |
= core: adjust the assertions on ActorMetricsSpec accordingly to our current collection model
Diffstat (limited to 'kamon-core/src/test/scala/kamon')
-rw-r--r-- | kamon-core/src/test/scala/kamon/metrics/ActorMetricsSpec.scala | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/kamon-core/src/test/scala/kamon/metrics/ActorMetricsSpec.scala b/kamon-core/src/test/scala/kamon/metrics/ActorMetricsSpec.scala index 29b8eafc..61d15bc9 100644 --- a/kamon-core/src/test/scala/kamon/metrics/ActorMetricsSpec.scala +++ b/kamon-core/src/test/scala/kamon/metrics/ActorMetricsSpec.scala @@ -69,12 +69,8 @@ class ActorMetricsSpec extends TestKitBase with WordSpecLike with Matchers { } val actorMetrics = expectActorMetrics("user/tracked-normal-conditions", metricsListener, 3 seconds) - // Mailbox size is measured twice, on queue and dequeue, plus the automatic last-value recording. - actorMetrics.mailboxSize.numberOfMeasurements should be(21) actorMetrics.mailboxSize.max should be <= 10L - actorMetrics.processingTime.numberOfMeasurements should be(10L) - actorMetrics.timeInMailbox.numberOfMeasurements should be(10L) } @@ -92,8 +88,9 @@ class ActorMetricsSpec extends TestKitBase with WordSpecLike with Matchers { // process the tick in which the actor is stalled. val stalledTickMetrics = expectActorMetrics("user/tracked-mailbox-size-queueing-up", metricsListener, 2 seconds) stalledTickMetrics.mailboxSize.numberOfMeasurements should equal(1) - stalledTickMetrics.mailboxSize.measurements should contain only (Measurement(9, 1)) // only the automatic last-value recording - stalledTickMetrics.mailboxSize.max should equal(9) + // only the automatic last-value recording should be taken, and includes the message being currently processed. + stalledTickMetrics.mailboxSize.measurements should contain only (Measurement(10, 1)) + stalledTickMetrics.mailboxSize.max should equal(10) stalledTickMetrics.processingTime.numberOfMeasurements should be(0L) stalledTickMetrics.timeInMailbox.numberOfMeasurements should be(0L) |