From a903eeaae8733b2f1ddc0fc6370a9ba6a7934aeb Mon Sep 17 00:00:00 2001 From: Christine Poerschke Date: Wed, 6 Apr 2016 18:18:57 +0100 Subject: [PATCH] Tweak TestRateLimiter.testThreads logic. (Make visible the fact that the machine/actualMBPerSec was way-too-slow i.e. the not-too-fast portion of the test wasn't really checked.) --- .../core/src/test/org/apache/lucene/store/TestRateLimiter.java | 2 +- 1 file changed, 1 insertion(+), 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 ca44bf04f77..50db1cde2d8 100644 --- a/lucene/core/src/test/org/apache/lucene/store/TestRateLimiter.java +++ b/lucene/core/src/test/org/apache/lucene/store/TestRateLimiter.java @@ -94,7 +94,7 @@ public final class TestRateLimiter extends LuceneTestCase { double ratio = actualMBPerSec/targetMBPerSec; // 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); + assumeTrue("actualMBPerSec=" + actualMBPerSec + " targetMBPerSec=" + targetMBPerSec, 0.9 <= ratio); assertTrue("targetMBPerSec=" + targetMBPerSec + " actualMBPerSec=" + actualMBPerSec, ratio <= 1.1); } }