RFR: 8276763: java/nio/channels/SocketChannel/AdaptorStreams.java fails with "SocketTimeoutException: Read timed out"

Daniel Fuchs dfuchs at openjdk.java.net
Thu Nov 11 18:41:33 UTC 2021


On Thu, 11 Nov 2021 13:53:26 GMT, Alan Bateman <alanb at openjdk.org> wrote:

> test/jdk/java/nio/channels/SocketChannel/AdaptorStreams.java tests SocketChannel's socket adaptor. Two of tests, testTimedRead1 and testTimedRead2 have relatively short timeouts which can cause the test to fail if the VM is paused or the machine is hung/overloaded for more than a few seconds. I've changed the timeout used by the two tests to 60s. This change does not impact the duration of the test because the reads do not timeout.
> 
> In passing, I've changed testTimedRead3 to use a timeout of 500ms, it is expected to throw SocketTimeoutException, and replaced setSoTimeout(60*1000) with setSoTimeout(60_000) in several other tests.

LGTM

-------------

Marked as reviewed by dfuchs (Reviewer).

PR: https://git.openjdk.java.net/jdk/pull/6351


More information about the nio-dev mailing list