mirror of https://github.com/apache/lucene.git
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:
parent
3d6f2aa31c
commit
a903eeaae8
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue