[9] [XXS] RFR 8137230: TEST_BUG: java/nio/channels/FileChannel/LoopingTruncate.java timed out

Roger Riggs Roger.Riggs at Oracle.com
Mon Sep 28 17:59:46 UTC 2015

Hi Ivan,

Looks ok.

One comment about timeouts, the test library has a function to extend 
the timeout based
on the -timeoutOption;  Using jdk.testlibrary.Utils.adjustTime(nn) is 
useful if the extension
of the timeout will be useful depending on the execution machine or vm 


On 9/28/2015 1:19 PM, Ivan Gerasimov wrote:
> Hello!
> The just added test started to intermittently fail on some machines.
> It appears that creating a temporary file and doing some simple IO 
> with it can sometimes take more than 10 seconds even without an 
> infinite loop.
> The proposal is:
> - increase the timeout;
> - limit the amount of work to only truncation of the file;
> - if a case of failure, print a stacktrace of the frozen thread for a 
> better diagnostic.
> With this change, the test passed on all the platforms.
> Would you please help review the fix?
> BUGURL: https://bugs.openjdk.java.net/browse/JDK-8137230
> WEBREV: http://cr.openjdk.java.net/~igerasim/8137230/00/webrev/
> Sincerely yours,
> Ivan

More information about the nio-dev mailing list