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 | 98bb6b81e8f0f79ea42157e6c146cd8f795b3a6d (patch) | |
tree | bdda4baf6b401a27100948ea364886a084c0b9e2 /kamon-core/src/test | |
parent | 55b3675a0b699c7a206131aea5bed6f4020c6906 (diff) | |
download | Kamon-98bb6b81e8f0f79ea42157e6c146cd8f795b3a6d.tar.gz Kamon-98bb6b81e8f0f79ea42157e6c146cd8f795b3a6d.tar.bz2 Kamon-98bb6b81e8f0f79ea42157e6c146cd8f795b3a6d.zip |
= core: adjust the assertions on ActorMetricsSpec accordingly to our current collection model
Diffstat (limited to 'kamon-core/src/test')
-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) |