Hi, Mark I have updated the patch as your suggestion. It works well. Thank you for your help!
On Fri, Aug 28, 2009 at 3:44 PM, Mark Hindess (JIRA) <j...@apache.org>wrote: > > [ > https://issues.apache.org/jira/browse/HARMONY-6324?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12748714#action_12748714] > > Mark Hindess commented on HARMONY-6324: > --------------------------------------- > > Ray, > > You need to connect to the real bound port so you need: > > @@ -1711,13 +1711,13 @@ > * Regression test for Harmony-1947. > */ > public void test_finishConnect() throws Exception { > - SocketAddress address = new InetSocketAddress("localhost", 2046); > - > ServerSocketChannel theServerChannel = ServerSocketChannel.open(); > ServerSocket serversocket = theServerChannel.socket(); > serversocket.setReuseAddress(true); > // Bind the socket > - serversocket.bind(address); > + serversocket.bind(new InetSocketAddress("localhost", 0)); > + SocketAddress address = > + new InetSocketAddress("localhost", > serversocket.getLocalPort()); > > boolean doneNonBlockingConnect = false; > // Loop so that we make sure we're definitely testing > finishConnect() > > > > [classlib][nio]SocketChannelTest.test_finishConnect may failed when the > port number has been occupied > > > ----------------------------------------------------------------------------------------------------- > > > > Key: HARMONY-6324 > > URL: https://issues.apache.org/jira/browse/HARMONY-6324 > > Project: Harmony > > Issue Type: Bug > > Components: Classlib > > Affects Versions: 5.0M11 > > Environment: all platform > > Reporter: Ray Chen > > Assignee: Mark Hindess > > Priority: Minor > > Attachments: 6324.diff > > > > Original Estimate: 24h > > Remaining Estimate: 24h > > > > If the port number has been occupied, the test case failed because of > java.net.BindException > > -- > This message is automatically generated by JIRA. > - > You can reply to this email to add a comment to the issue online. > > -- Ray Chen MSN:clrayc...@hotmail.com <msn%3aclrayc...@hotmail.com> Email:claryc...@gmail.com <email%3aclaryc...@gmail.com>