Return-Path: Delivered-To: apmail-harmony-dev-archive@www.apache.org Received: (qmail 84302 invoked from network); 13 Feb 2007 22:01:20 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 13 Feb 2007 22:01:20 -0000 Received: (qmail 65928 invoked by uid 500); 13 Feb 2007 22:01:25 -0000 Delivered-To: apmail-harmony-dev-archive@harmony.apache.org Received: (qmail 65730 invoked by uid 500); 13 Feb 2007 22:01:25 -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 65721 invoked by uid 99); 13 Feb 2007 22:01:25 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 13 Feb 2007 14:01:25 -0800 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 gshimansky@gmail.com designates 64.233.182.191 as permitted sender) Received: from [64.233.182.191] (HELO nf-out-0910.google.com) (64.233.182.191) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 13 Feb 2007 14:01:13 -0800 Received: by nf-out-0910.google.com with SMTP id d4so451688nfe for ; Tue, 13 Feb 2007 14:00:51 -0800 (PST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:from:to:subject:date:user-agent:references:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:message-id; b=qQuRo1ZryBTMFYm6T5z2EcusC3dDDeY+iHz+YTKP7oZ9m/3e5/CmyRhXG7V4ORV8vV7imqmF80Dzye1Rz+l+Q/u0/SGHtIAZsfK1/VgkhjaKUeHLjC9yqODfhqomG5rd/no/rBAAmzmZfwfXDZtbQrY45w4CMDW7Ml+pLG+MrHI= Received: by 10.82.175.2 with SMTP id x2mr12779973bue.1171404047698; Tue, 13 Feb 2007 14:00:47 -0800 (PST) Received: from desktop ( [85.140.69.74]) by mx.google.com with ESMTP id x24sm4345403nfb.2007.02.13.14.00.46; Tue, 13 Feb 2007 14:00:47 -0800 (PST) From: Gregory Shimansky To: dev@harmony.apache.org Subject: Re: [classlib] Intermittent failures of UDP tests Date: Wed, 14 Feb 2007 01:00:59 +0300 User-Agent: KMail/1.9.5 References: <51abf0750702130705n3cb3ce6aj37cbe622b0a95dcf@mail.gmail.com> <51abf0750702131059h44f278c9sc5c8d6d1a57e7d22@mail.gmail.com> In-Reply-To: <51abf0750702131059h44f278c9sc5c8d6d1a57e7d22@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200702140100.59787.gshimansky@gmail.com> X-Virus-Checked: Checked by ClamAV on apache.org On Tuesday 13 February 2007 21:59 Mikhail Markov wrote: > > I don't quite get it. Is it operating system to be blamed or the code > > for ServerSocket(0) which returns a port that is still used by some > > socket? > > No, the code for obtaining the available port is the following ( > tests.support.Support_PortManager): > ServerSocket ss = new ServerSocket(0); > int port = ss.getLocalPort(); > ss.close(); > return port; > It works ok: creates a ServerSocket on a not-busy port, but when we try to > use this port number somewhere in the test for creating a new Sockets, we > get the mentioned "Address already in use" exception. Seems like the > ServerSocket is not fully closed at the moment we're trying to use the > generated port. I just don't understand it why creating a socket on a non-busy port as you say results in an exception that it is actually still busy. Does this test behave in the same way on RI? -- Gregory