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/26 12:46:29 UTC
[jira] Created: (HARMONY-664) [classlib][nio]
o.a.h.tests.java.nio.channels.SelectionKeyTest.test_readyOps() is unstable
[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
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
[jira] Updated: (HARMONY-664) [classlib][nio]
o.a.h.tests.java.nio.channels.SelectionKeyTest.test_readyOps() is unstable
Posted by "Andrew Zhang (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/HARMONY-664?page=all ]
Andrew Zhang updated HARMONY-664:
---------------------------------
Attachment: nio.diff
Hello,
Would you please try my patch?
Thanks a lot!
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
> 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
[jira] Assigned: (HARMONY-664) [classlib][nio]
o.a.h.tests.java.nio.channels.SelectionKeyTest.test_readyOps() is unstable
Posted by "George Harley (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/HARMONY-664?page=all ]
George Harley reassigned HARMONY-664:
-------------------------------------
Assign To: George Harley
> [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
[jira] Resolved: (HARMONY-664) [classlib][nio]
o.a.h.tests.java.nio.channels.SelectionKeyTest.test_readyOps() is unstable
Posted by "George Harley (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/HARMONY-664?page=all ]
George Harley resolved HARMONY-664:
-----------------------------------
Resolution: Fixed
Hello Andrew,
Change applied in revision 417372. Please could you check that it has been carried out as expected.
Best regards,
George
> [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
[jira] Closed: (HARMONY-664) [classlib][nio]
o.a.h.tests.java.nio.channels.SelectionKeyTest.test_readyOps() is unstable
Posted by "George Harley (JIRA)" <ji...@apache.org>.
[ 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
[jira] Commented: (HARMONY-664) [classlib][nio]
o.a.h.tests.java.nio.channels.SelectionKeyTest.test_readyOps() is unstable
Posted by "Andrew Zhang (JIRA)" <ji...@apache.org>.
[ 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