harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "George Harley (JIRA)" <j...@apache.org>
Subject [jira] Closed: (HARMONY-664) [classlib][nio] o.a.h.tests.java.nio.channels.SelectionKeyTest.test_readyOps() is unstable
Date Tue, 27 Jun 2006 20:29:37 GMT
     [ http://issues.apache.org/jira/browse/HARMONY-664?page=all ]
     
George Harley closed HARMONY-664:
---------------------------------


Verified by Andrew.

> [classlib][nio] o.a.h.tests.java.nio.channels.SelectionKeyTest.test_readyOps() is unstable
> ------------------------------------------------------------------------------------------
>
>          Key: HARMONY-664
>          URL: http://issues.apache.org/jira/browse/HARMONY-664
>      Project: Harmony
>         Type: Test

>   Components: Classlib
>     Reporter: Andrew Zhang
>     Assignee: George Harley
>  Attachments: nio.diff
>
> o.a.h.tests.java.nio.channels.SelectionKeyTest.test_readyOps() is unstable. 
> selectNow can not guarantee "OP_CONNECT" operation is available before its execution.
> Use "select" instead of "selectNow" could solve this problem.
> I'll upload a patch soon.
> Thanks!
>     public void test_readyOps() throws IOException {
>         int port = Support_PortManager.getNextPort();
>         ServerSocket ss = new ServerSocket(port);
>         try {
>             sc.connect(new InetSocketAddress(LOCAL_ADDR, port));
>             assertEquals(0, selectionKey.readyOps());
>             assertFalse(selectionKey.isConnectable());
>             selector.selectNow();
>             assertEquals(SelectionKey.OP_CONNECT, selectionKey.readyOps());
>         } finally {
>             ss.close();
>             ss = null;
>         }
>       
>     }

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


Mime
View raw message