From 71c298276f53af90cf585701c214ef0169610f91 Mon Sep 17 00:00:00 2001 From: pivovarit Date: Thu, 19 Jan 2017 21:00:55 +0100 Subject: [PATCH] Refactor MetricsTest --- .../java/com/baeldung/metrics/core/MetricsTest.java | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/metrics/src/test/java/com/baeldung/metrics/core/MetricsTest.java b/metrics/src/test/java/com/baeldung/metrics/core/MetricsTest.java index 882cc6785f..f670acfaef 100644 --- a/metrics/src/test/java/com/baeldung/metrics/core/MetricsTest.java +++ b/metrics/src/test/java/com/baeldung/metrics/core/MetricsTest.java @@ -1,16 +1,15 @@ package com.baeldung.metrics.core; -import static org.hamcrest.CoreMatchers.equalTo; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertThat; +import com.codahale.metrics.*; +import org.junit.Test; import java.util.ArrayList; import java.util.List; import java.util.concurrent.TimeUnit; -import org.junit.Test; - -import com.codahale.metrics.*; +import static org.hamcrest.CoreMatchers.equalTo; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertThat; public class MetricsTest { @Test @@ -139,7 +138,7 @@ public class MetricsTest { long elapsed1 = context1.stop(); - assertEquals(5000000000L, elapsed1, 1000000); + assertEquals(5000000000L, elapsed1, 10000000); assertThat(timer.getCount(), equalTo(1L)); assertEquals(0.2, timer.getMeanRate(), 0.1);