From 0311cd2be856e4c5872ebbe5ac7e12eac334ad73 Mon Sep 17 00:00:00 2001 From: Mathieu Chartier Date: Tue, 13 Jan 2015 10:45:52 -0800 Subject: 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 Change-Id: I92477225492712448b0a78354730a037e2dda1a1 --- .../harmony/tests/org/apache/harmony/kernel/dalvik/ThreadsTest.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'harmony-tests') 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) { -- cgit v1.1