6932744: TEST_BUG: java/nio/channels/Selector/OpRead.java failing

Alan Bateman Alan.Bateman at oracle.com
Tue Jun 15 08:25:00 PDT 2010


Chris Hegarty wrote:
> The changes look fine.
>
> One minor comment. Will InetAddress.getLocalHost ever throw 
> UnknownHostException (if the hostname is not in DNS)? You could simply 
> create the InetSocketAddress with "localhost". Either is fine with me.
Thanks. I think I'll leave it as is (as I'm pretty sure we would have 
test failures across the board with both the networking and NIO tests if 
getLocalHost were to throw UHE).

So I've one more for you. The 
test/java/nio/channels/SocketChannel/OpenLeak.java creates a security 
manager and cannot run in samevm mode. The bug for this is 6961358 and 
the fix is to simply run it in othervm mode (and remove it from the 
problem list).


diff --git a/test/java/nio/channels/SocketChannel/OpenLeak.java 
b/test/java/nio/channels/SocketChannel/OpenLeak.java
--- a/test/java/nio/channels/SocketChannel/OpenLeak.java
+++ b/test/java/nio/channels/SocketChannel/OpenLeak.java
@@ -25,6 +25,8 @@
  * @bug 6548464
  * @summary SocketChannel.open(SocketAddress) leaks file descriptor if
  *     connection cannot be established
+ * @build OpenLeak
+ * @run main/othervm OpenLeak
  */

Do you mind reviewing this too?

-Alan





More information about the nio-dev mailing list