RFR [8038982]: java/lang/ref/EarlyTimeout.java failed again

Ivan Gerasimov ivan.gerasimov at oracle.com
Mon Apr 14 18:26:29 UTC 2014


On 14.04.2014 20:18, Mandy Chung wrote:
>
> On 4/14/2014 6:21 AM, Ivan Gerasimov wrote:
>> Hello!
>>
>> The test EarlyTimeout.java failed again, now with message "elapsed 
>> time 981 is less than timeout 1000."
>>
>> The root cause seems to be non-accurate time measurement in Windows:
>> http://msdn.microsoft.com/en-us/library/windows/desktop/ms724397(v=vs.85).aspx 
>>
>>
>> There might be two ways to address the issue:
>> - add a tolerance > 15 ms, or
>> - use System.nanoTime() for the measurement.
>>
>> I did both.
>>
>> Would you please help review the test fix?
>>
>> BUGURL: https://bugs.openjdk.java.net/browse/JDK-8038982
>> WEBREV: http://cr.openjdk.java.net/~igerasim/8038982/0/webrev/
>>
>
> Thanks for putting time in getting this test more reliable.   Have you 
> thought about keep zero tolerance (or much smaller value) when the 
> test is running on *nix platforms?
>
Actually, zero tolerance should be sufficient now even for Windows platform.
Measuring the time with nanoTime() should make the inner and outer time 
intervals consistent.

I've added the tolerance just to play safer.
I can remove it.

Sincerely yours,
Ivan

> Mandy
>
>




More information about the core-libs-dev mailing list