From qpid-dev-return-10881-apmail-incubator-qpid-dev-archive=incubator.apache.org@incubator.apache.org Tue Jul 15 21:24:19 2008 Return-Path: Delivered-To: apmail-incubator-qpid-dev-archive@locus.apache.org Received: (qmail 37839 invoked from network); 15 Jul 2008 21:24:19 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 15 Jul 2008 21:24:19 -0000 Received: (qmail 82797 invoked by uid 500); 15 Jul 2008 21:24:19 -0000 Delivered-To: apmail-incubator-qpid-dev-archive@incubator.apache.org Received: (qmail 82777 invoked by uid 500); 15 Jul 2008 21:24:19 -0000 Mailing-List: contact qpid-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: qpid-dev@incubator.apache.org Delivered-To: mailing list qpid-dev@incubator.apache.org Received: (qmail 82766 invoked by uid 99); 15 Jul 2008 21:24:19 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 15 Jul 2008 14:24:19 -0700 X-ASF-Spam-Status: No, hits=-4.0 required=10.0 tests=RCVD_IN_DNSWL_MED,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of rafaels@redhat.com designates 66.187.233.31 as permitted sender) Received: from [66.187.233.31] (HELO mx1.redhat.com) (66.187.233.31) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 15 Jul 2008 21:23:26 +0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id m6FLNmQ9020089 for ; Tue, 15 Jul 2008 17:23:49 -0400 Received: from mail.boston.redhat.com (mail.boston.redhat.com [10.16.255.12]) by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id m6FLNmjO018918 for ; Tue, 15 Jul 2008 17:23:48 -0400 Received: from planitia.bos.redhat.com (planitia.bos.redhat.com [10.16.16.54]) by mail.boston.redhat.com (8.13.1/8.13.1) with ESMTP id m6FLNmaZ021122 for ; Tue, 15 Jul 2008 17:23:48 -0400 Message-ID: <487D14EA.2010806@redhat.com> Date: Tue, 15 Jul 2008 17:21:46 -0400 From: Rafael Schloming User-Agent: Thunderbird 2.0.0.9 (X11/20071115) MIME-Version: 1.0 To: qpid-dev@incubator.apache.org Subject: Re: Java - CPP Test profile failures References: <99e30fe50807150925m469dda9w9a206ca3911ae493@mail.gmail.com> In-Reply-To: <99e30fe50807150925m469dda9w9a206ca3911ae493@mail.gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.58 on 172.16.52.254 X-Virus-Checked: Checked by ClamAV on apache.org Martin Ritchie wrote: > Hi, > > When running on my RHEL4 box with -Dprofile=cpp I'm getting a number > of failures due to the way we run our tests. > > As a fresh broker is created for each test it appears that > occasionally the Socket hasn't been released so the next test can't > have a fresh broker. > > Has anyone else found this? How easy would it be for the tests to > start the broker on a random port or for the broker to pick a free > port to start up on and the QpidTestCase to extract that and use it in > the tests? I haven't seen this particular issue before. I'm a bit puzzled by how it can occur since I believe the broker sets the SO_REUSADDR option on the socket, and QpidTestCase should block until the broker process exits. In any case, I think it shouldn't be too difficult to make the change you suggest. If you specify -p0 the broker will bind to an unused port. QpidTestCase already scans for a log message from the broker in order to verify that it has actually bound to the port before allowing the test to run. It should be straightforward to modify that same code to regex out the chosen port number. --Rafael