JDK 9 RFR of JDK-8143610: (dc) java/nio/channels/DatagramChannel/AdaptDatagramSocket.java failed intermittently due to SocketTimeoutException
Hamlin Li
huaming.li at oracle.com
Fri Mar 4 13:05:35 UTC 2016
Please review the patch for test
java/nio/channels/DatagramChannel/AdaptDatagramSocket.java
It's a test issue. By launch lots threads to exhaust cpu and network
bandwidth, the issue could be reproduced locally with timeout value as
1000 millisecond ( timeout value in test code is 15000 millisecond ).
Root cause: Test success depends on a specific timeout value, but in a
extremely busy system, it's understandable that socket r/w can not
finish in before timeout, so java.net.SocketTimeoutException will be
thrown.
Solution: Should not assume the socket operation could be finished in a
specific time, just set the timeout as max value.
bug: https://bugs.openjdk.java.net/browse/JDK-8143610
webrev: http://cr.openjdk.java.net/~mli/8143610/webrev.00/
Thank you
-Hamlin
More information about the nio-dev
mailing list