Return-Path: Delivered-To: apmail-incubator-harmony-commits-archive@www.apache.org Received: (qmail 60201 invoked from network); 26 Jun 2006 10:50:04 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 26 Jun 2006 10:50:04 -0000 Received: (qmail 7875 invoked by uid 500); 26 Jun 2006 10:50:03 -0000 Delivered-To: apmail-incubator-harmony-commits-archive@incubator.apache.org Received: (qmail 7785 invoked by uid 500); 26 Jun 2006 10:50:03 -0000 Mailing-List: contact harmony-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: harmony-dev@incubator.apache.org Delivered-To: mailing list harmony-commits@incubator.apache.org Received: (qmail 7769 invoked by uid 99); 26 Jun 2006 10:50:03 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 26 Jun 2006 03:50:03 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [209.237.227.198] (HELO brutus.apache.org) (209.237.227.198) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 26 Jun 2006 03:50:02 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 4DEBC410009 for ; Mon, 26 Jun 2006 10:48:30 +0000 (GMT) Message-ID: <3171358.1151318910316.JavaMail.jira@brutus> Date: Mon, 26 Jun 2006 10:48:30 +0000 (GMT+00:00) From: "Andrew Zhang (JIRA)" To: harmony-commits@incubator.apache.org Subject: [jira] Updated: (HARMONY-664) [classlib][nio] o.a.h.tests.java.nio.channels.SelectionKeyTest.test_readyOps() is unstable In-Reply-To: <2778733.1151318789768.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N [ 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