RFR: 8141595: java/nio/channels/ServerSocketChannel/NonBlockingAccept.java fails intermittently

Hamlin Li huaming.li at oracle.com
Fri Jan 15 09:36:36 UTC 2016



On 2016/1/15 17:02, Alan Bateman wrote:
>
> On 15/01/2016 05:29, Hamlin Li wrote:
>> Hi everyone,
>>
>> Would you please help to review the fix for 
>> https://bugs.openjdk.java.net/browse/JDK-8141595, 
>> java/nio/channels/ServerSocketChannel/NonBlockingAccept.java fails 
>> intermittently.
>> webrev : http://cr.openjdk.java.net/~mli/8141595/webrev.00/
> Another old test using Thread.sleep :-)
Hi Alan,
Yes, it is. :-)
>
> I assume the issue is that the sleep time is not sufficient on busy 
> systems. Your approach is okay but would be good to keep the coding 
> style / line length consistent etc.  An alternative is not to drop 
> LOOPS and let it loop until a connection is accepted or the test is 
> timed out by jtreg.
Yes, the root cause is sleep time is not sufficient on busy systems. And 
I follow your suggestion to fix the code style and line length, and let 
jtreg to timeout the test case.
new webrev: http://cr.openjdk.java.net/~mli/8141595/webrev.01/

Thank you
-Hamlin
>
> -Alan



More information about the nio-dev mailing list