zipkin-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From adrianc...@apache.org
Subject [incubator-zipkin-brave] 02/02: Makes soak test slightly tolerant
Date Mon, 03 Jun 2019 04:28:06 GMT
This is an automated email from the ASF dual-hosted git repository.

adriancole pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-zipkin-brave.git

commit a0f352507612f3238bfa3e4df551a8d28d22e27c
Author: Adrian Cole <acole@pivotal.io>
AuthorDate: Mon Jun 3 12:11:06 2019 +0800

    Makes soak test slightly tolerant
---
 brave/src/test/java/brave/sampler/RateLimitingSamplerSoakTest.java | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/brave/src/test/java/brave/sampler/RateLimitingSamplerSoakTest.java b/brave/src/test/java/brave/sampler/RateLimitingSamplerSoakTest.java
index bca68f1..b8fa32b 100644
--- a/brave/src/test/java/brave/sampler/RateLimitingSamplerSoakTest.java
+++ b/brave/src/test/java/brave/sampler/RateLimitingSamplerSoakTest.java
@@ -32,6 +32,7 @@ import org.junit.runner.RunWith;
 import static com.google.common.util.concurrent.Uninterruptibles.sleepUninterruptibly;
 import static org.assertj.core.api.Assertions.assertThat;
 import static org.assertj.core.api.Assumptions.assumeThat;
+import static org.assertj.core.data.Percentage.withPercentage;
 
 @RunWith(Theories.class)
 public class RateLimitingSamplerSoakTest {
@@ -80,7 +81,8 @@ public class RateLimitingSamplerSoakTest {
     service.shutdown();
     service.awaitTermination(1, TimeUnit.SECONDS);
 
-    assertThat(passed.get()).isEqualTo(reservoir);
+    assertThat(passed.get())
+        .isCloseTo(reservoir, withPercentage(0.01)); // accomodates flakes in CI
     assumeThat(hitLastDecisecond.get())
         .withFailMessage("ran out of samples before the end of the second")
         .isTrue();


Mime
View raw message