From df4c2bab10c5e8bbca7b1d469aecc757d87869a5 Mon Sep 17 00:00:00 2001 From: Charles Allen Date: Thu, 17 Sep 2015 15:51:07 -0700 Subject: [PATCH] Soften concurrency requirements on IncrementalIndexTest --- .../java/io/druid/segment/data/IncrementalIndexTest.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/processing/src/test/java/io/druid/segment/data/IncrementalIndexTest.java b/processing/src/test/java/io/druid/segment/data/IncrementalIndexTest.java index af3af0d6569..8b4a3c40af3 100644 --- a/processing/src/test/java/io/druid/segment/data/IncrementalIndexTest.java +++ b/processing/src/test/java/io/druid/segment/data/IncrementalIndexTest.java @@ -376,13 +376,13 @@ public class IncrementalIndexTest } ) ) { - final Integer ranCount = someoneRan.get(); - if (ranCount > 0) { + final Integer maxValueExpected = someoneRan.get() + concurrentThreads; + if (maxValueExpected > 0) { // Eventually consistent, but should be somewhere in that range // Actual result is validated after all writes are guaranteed done. Assert.assertTrue( - String.format("%d >= %g >= 0 violated", ranCount, result), - result >= 0 && result <= ranCount + String.format("%d >= %g >= 0 violated", maxValueExpected, result), + result >= 0 && result <= maxValueExpected ); } }