Merge pull request #1123 from DianeDuan/metrics-ut-fix

BAEL-548: Increased deltas for tests
This commit is contained in:
pedja4 2017-02-06 11:38:46 +01:00 committed by GitHub
commit 51427bf70c
1 changed files with 3 additions and 3 deletions

View File

@ -138,15 +138,15 @@ public class MetricsTest {
long elapsed1 = context1.stop(); long elapsed1 = context1.stop();
assertEquals(5000000000L, elapsed1, 10000000); assertEquals(5000000000L, elapsed1, 1000000000);
assertThat(timer.getCount(), equalTo(1L)); assertThat(timer.getCount(), equalTo(1L));
assertEquals(0.2, timer.getMeanRate(), 0.1); assertEquals(0.2, timer.getMeanRate(), 0.2);
Timer.Context context2 = timer.time(); Timer.Context context2 = timer.time();
TimeUnit.SECONDS.sleep(2); TimeUnit.SECONDS.sleep(2);
context2.close(); context2.close();
assertThat(timer.getCount(), equalTo(2L)); assertThat(timer.getCount(), equalTo(2L));
assertEquals(0.3, timer.getMeanRate(), 0.1); assertEquals(0.3, timer.getMeanRate(), 0.2);
} }
} }