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.)
This commit is contained in:
Christine Poerschke 2016-04-06 18:18:57 +01:00
parent 3d6f2aa31c
commit a903eeaae8
1 changed files with 1 additions and 1 deletions

View File

@ -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);
}
}