diff options
author | Mathieu Chartier <mathieuc@google.com> | 2015-01-13 10:45:52 -0800 |
---|---|---|
committer | Mathieu Chartier <mathieuc@google.com> | 2015-01-13 10:59:55 -0800 |
commit | 6db3d0ce897acb80416f8bb82695a8743856cedb (patch) | |
tree | 589df6ebe9af864f3963ff85381f79ec45106b0b /harmony-tests/src/test | |
parent | 6bfd8701461f0794a529e00dd12c61b67a5497d3 (diff) | |
download | libcore-6db3d0ce897acb80416f8bb82695a8743856cedb.zip libcore-6db3d0ce897acb80416f8bb82695a8743856cedb.tar.gz libcore-6db3d0ce897acb80416f8bb82695a8743856cedb.tar.bz2 |
Increase ThreadTest tolerance
Aims to fix flaky test.
Decreased minimum from 90% to 80%.
Increased maximum from 110% to 120%.
Increased maximum waitMillis from 10ms to 30ms.
Bug: 18788389
(cherry picked from commit 0311cd2be856e4c5872ebbe5ac7e12eac334ad73)
Change-Id: Ie3d84cf71769208e851b9fa7587c62858efdf4dd
Diffstat (limited to 'harmony-tests/src/test')
-rw-r--r-- | harmony-tests/src/test/java/org/apache/harmony/tests/org/apache/harmony/kernel/dalvik/ThreadsTest.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/harmony-tests/src/test/java/org/apache/harmony/tests/org/apache/harmony/kernel/dalvik/ThreadsTest.java b/harmony-tests/src/test/java/org/apache/harmony/tests/org/apache/harmony/kernel/dalvik/ThreadsTest.java index 19c6229..c971e99 100644 --- a/harmony-tests/src/test/java/org/apache/harmony/tests/org/apache/harmony/kernel/dalvik/ThreadsTest.java +++ b/harmony-tests/src/test/java/org/apache/harmony/tests/org/apache/harmony/kernel/dalvik/ThreadsTest.java @@ -234,10 +234,10 @@ public class ThreadsTest extends TestCase { * Allow a bit more slop for the maximum on "expected * instantaneous" results. */ - long minimum = (long) ((double) expectedMillis * 0.90); + long minimum = (long) ((double) expectedMillis * 0.80); long maximum = - Math.max((long) ((double) expectedMillis * 1.10), 10); - long waitMillis = Math.max(expectedMillis * 10, 10); + Math.max((long) ((double) expectedMillis * 1.20), 10); + long waitMillis = Math.max(expectedMillis * 10, 30); long duration = getDurationMillis(waitMillis); if (duration < minimum) { |