[9] Review request : JDK-8059070: [TESTBUG] java/lang/invoke/LFCaching/LFMultiThreadCachingTest.java failed - timeout

Paul Sandoz paul.sandoz at oracle.com
Thu Oct 16 09:30:08 UTC 2014

On Oct 16, 2014, at 10:43 AM, Konstantin Shefov <konstantin.shefov at oracle.com> wrote:

> Gently reminder
> On 14.10.2014 16:58, Konstantin Shefov wrote:
>> Hello,
>> Please review the test bug fix https://bugs.openjdk.java.net/browse/JDK-8059070
>> Webrev is http://cr.openjdk.java.net/~kshefov/8059070/webrev.00/

  45     private static final long TIMEOUT = 300000;

Does jtreg define a system property for this value? and is 300s the same as what jtreg defines as the default? 

The online documentation (jtreg -onlineHelp) says the default is 2 minutes, but that might be out of date.

Might be more readable to use:


 143             long passedTime = new Date().getTime() - startTime;

Why don't you use System.currentTimeMillis() instead of "new Date().getTime()" ?

 145             double timeoutFactor = new Double(System.getProperty("test.timeout.factor", "1.0"));

You can that pull out into a static and perhaps merge with TIMEOUT.

 147             if (avgIterTime > 2 * remainTime) {

That seems sufficient but it will be interesting to see if intermittent failures still occur due to high variance. 


More information about the core-libs-dev mailing list