Skip to content

Commit

Permalink
Tweak TestRateLimiter.testThreads logic.
Browse files Browse the repository at this point in the history
(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.)
  • Loading branch information
cpoerschke committed Apr 6, 2016
1 parent 2259288 commit a893aaa
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ public void run() {
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);
}
}

0 comments on commit a893aaa

Please sign in to comment.