simplifying the test

This commit is contained in:
Guillaume Polaert 2017-04-27 19:21:07 +02:00
parent abdbfffdff
commit bebf815781
1 changed files with 2 additions and 2 deletions

View File

@ -17,7 +17,7 @@ public class RateSamplerTest {
DDSpan mockSpan = mock(DDSpan.class);
final double sampleRate = 0.35;
final int iterations = 100000;
final int iterations = 1000;
Sampler sampler = new RateSampler(sampleRate);
int kept = 0;
@ -28,7 +28,7 @@ public class RateSamplerTest {
}
}
assertThat(((double) kept / iterations)).isBetween(sampleRate - 0.01, sampleRate + 0.01);
assertThat(((double) kept / iterations)).isBetween(sampleRate - 0.02, sampleRate + 0.02);
}