Return-Path: Delivered-To: apmail-harmony-dev-archive@www.apache.org Received: (qmail 43391 invoked from network); 18 Apr 2007 08:34:26 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 18 Apr 2007 08:34:26 -0000 Received: (qmail 13327 invoked by uid 500); 18 Apr 2007 08:34:30 -0000 Delivered-To: apmail-harmony-dev-archive@harmony.apache.org Received: (qmail 13299 invoked by uid 500); 18 Apr 2007 08:34:30 -0000 Mailing-List: contact dev-help@harmony.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@harmony.apache.org Delivered-To: mailing list dev@harmony.apache.org Received: (qmail 13290 invoked by uid 99); 18 Apr 2007 08:34:30 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 18 Apr 2007 01:34:30 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of t.p.ellison@gmail.com designates 66.249.92.173 as permitted sender) Received: from [66.249.92.173] (HELO ug-out-1314.google.com) (66.249.92.173) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 18 Apr 2007 01:34:22 -0700 Received: by ug-out-1314.google.com with SMTP id z36so280701uge for ; Wed, 18 Apr 2007 01:34:01 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:user-agent:mime-version:to:subject:references:in-reply-to:x-enigmail-version:content-type:content-transfer-encoding; b=iGSHeCdEk9gdsf3efgla/4hLTYGhYA2p6R/x8yOBPiLB0ReK8LFMe2iPqRQditYqvolZTExcp4sBKVdOMtWzGeIBVwk3TMkiDfrCAKmBg7o7m4SygwINzBd3r2Dhtf9T9YzN7/OqsxAEC4MjTqtgTp5BSBwgTSHqnstnTmdFonI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:user-agent:mime-version:to:subject:references:in-reply-to:x-enigmail-version:content-type:content-transfer-encoding; b=F8256cpcLX+6xcGKUtzuTxa/xAWt8GTEv0/ElxXCiyTrsCepUnPkhqhpz+SI2YK+31BtSLW6Z6Tw+MhqYxQPPGxsDzYEozP6VBiflcJUJIsw4nKWUFyAkRrAIp7xnE7MOwYeXRcIaflxU77c9nZCqmRaE2by4W8+zej/KeRrKOs= Received: by 10.67.95.3 with SMTP id x3mr711924ugl.1176885241147; Wed, 18 Apr 2007 01:34:01 -0700 (PDT) Received: from ?9.20.183.81? ( [195.212.29.83]) by mx.google.com with ESMTP id 24sm2461813ugf.2007.04.18.01.34.00; Wed, 18 Apr 2007 01:34:00 -0700 (PDT) Message-ID: <4625D7F2.3080603@gmail.com> Date: Wed, 18 Apr 2007 09:33:54 +0100 From: Tim Ellison User-Agent: Thunderbird 1.5.0.10 (Windows/20070221) MIME-Version: 1.0 To: dev@harmony.apache.org Subject: Re: [classlib][luni] new test in tests.api.java.net.SocketTest failed on my Windows XP sp2 References: <7273946b0704170150u10fe9f13vd430f0a3aa0399e2@mail.gmail.com> <46248CBA.7010702@gmail.com> <7273946b0704170216k43e3165cx30a19eb0ce27ea92@mail.gmail.com> <462498F7.6050300@gmail.com> <4624B462.1030607@gmail.com> <3b3f27c60704171505g21278641gf528578f6da3608@mail.gmail.com> <211709bc0704172011v633a552bubab887221a30a680@mail.gmail.com> <5c8e69f0704172025r773eba76w40f068d060026a1@mail.gmail.com> <4d0b24970704180044y40e6d391q7d0e6ad4586e20ec@mail.gmail.com> In-Reply-To: <4d0b24970704180044y40e6d391q7d0e6ad4586e20ec@mail.gmail.com> X-Enigmail-Version: 0.94.0.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Virus-Checked: Checked by ClamAV on apache.org Andrew Zhang wrote: > On 4/18/07, LvJimmy,Jing wrote: >> >> This method is good, but not perfect, for >> 1. getNextPortsForUDP get a free port by a mechanism "get and >> release", but release the port may not be successful (e.g, in linux) >> > 2. even it releases successfully, during the period between utility >> method "release" and serversocket reuse it, there may be some other >> program reuse the port, which cause the test fail again. > > > Open and close is not safe in theory, as we discussed before. > Let's stop getNextPort, and stick to use port 0. :) I think we have agreed > that a long time ago. Yes. > 3. this may cost much more time to get a port. >> > The perfect solution for this is re-write the testcases, create >> ServerSocket with port 0, and then get the local port for socket to >> connect. However I guess it may cause a lot of affect. > > > yes, but we can do it lazily and gradually. The important thing is that we > should not use the buggy getNextPort any more.... I agree, how about we mark it @deprecated to help remind people? Regards, Tim