From 63321f6467f173dc8ca16ed9e7b048b484d681e9 Mon Sep 17 00:00:00 2001 From: Ivan Topolnjak Date: Fri, 1 Apr 2016 13:20:20 +0200 Subject: core: catch any exception being thrown when recording values on histograms fixes #232, fixes #332 --- .../src/test/scala/kamon/metric/instrument/HistogramSpec.scala | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'kamon-core/src/test/scala/kamon') diff --git a/kamon-core/src/test/scala/kamon/metric/instrument/HistogramSpec.scala b/kamon-core/src/test/scala/kamon/metric/instrument/HistogramSpec.scala index adfcd826..dd60fee1 100644 --- a/kamon-core/src/test/scala/kamon/metric/instrument/HistogramSpec.scala +++ b/kamon-core/src/test/scala/kamon/metric/instrument/HistogramSpec.scala @@ -32,10 +32,8 @@ class HistogramSpec extends WordSpec with Matchers { histogram.record(10000) } - "fail when recording values higher than the highest trackable value" in new HistogramFixture { - intercept[IndexOutOfBoundsException] { - histogram.record(1000000) - } + "not fail when recording values higher than the highest trackable value" in new HistogramFixture { + histogram.record(Long.MaxValue) } "reset all recorded levels to zero after a snapshot collection" in new HistogramFixture { -- cgit v1.2.3