RFR 7116200: (cs) test/java/nio/charset/coders/StreamTimeout.java fails with "Address already in use"
jim.gish at oracle.com
Wed Apr 11 11:06:12 PDT 2012
Please review the following
The current code uses the fixed port of 22222 and the test fails if that
port is in use. The patch creates the socket on any open port using new
ServerSocket(0) and then determines the port in use with getLocalPort()
on the socket. That port is then used when creating the client. This
ensures the test won't fail with "address already in use".
Also, all sockets are closed when done. (Would appreciate comments on
whether I have engaged in overkill here, or not.)
Tests run: jdk_nio3 -- all pass.
More information about the core-libs-dev