From 090b804efc9ac17a44a2b949547dc06b36c888dd Mon Sep 17 00:00:00 2001 From: Michael McCandless Date: Tue, 6 May 2014 14:26:57 +0000 Subject: [PATCH] fix test bug causing false failure git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1592756 13f79535-47bb-0310-9956-ffa450edef68 --- .../src/test/org/apache/lucene/store/TestRateLimiter.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lucene/core/src/test/org/apache/lucene/store/TestRateLimiter.java b/lucene/core/src/test/org/apache/lucene/store/TestRateLimiter.java index 05de70f1320..cf9d8aab82e 100644 --- a/lucene/core/src/test/org/apache/lucene/store/TestRateLimiter.java +++ b/lucene/core/src/test/org/apache/lucene/store/TestRateLimiter.java @@ -88,6 +88,9 @@ public final class TestRateLimiter extends LuceneTestCase { // TODO: this may false trip .... could be we can only assert that it never exceeds the max, so slow jenkins doesn't trip: double ratio = actualMBPerSec/targetMBPerSec; - assertTrue("targetMBPerSec=" + targetMBPerSec + " actualMBPerSec=" + actualMBPerSec, ratio >= 0.9 && ratio <= 1.1); + + // Only enforce that it wasn't too fast; if machine is bogged down (can't schedule threads / sleep properly) then it may falsely be too slow: + //assertTrue("targetMBPerSec=" + targetMBPerSec + " actualMBPerSec=" + actualMBPerSec, ratio >= 0.9 && ratio <= 1.1); + assertTrue("targetMBPerSec=" + targetMBPerSec + " actualMBPerSec=" + actualMBPerSec, ratio <= 1.1); } }