You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Andrew Zhang (JIRA)" <ji...@apache.org> on 2006/06/27 13:11:30 UTC
[jira] Commented: (HARMONY-664) [classlib][nio]
o.a.h.tests.java.nio.channels.SelectionKeyTest.test_readyOps() is unstable
[ http://issues.apache.org/jira/browse/HARMONY-664?page=comments#action_12418005 ]
Andrew Zhang commented on HARMONY-664:
--------------------------------------
Hello George,
The fix looks good, thanks!
Best regards,
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