From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32536 invoked by alias); 6 Mar 2003 04:33:14 -0000 Mailing-List: contact mauve-discuss-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: mauve-discuss-owner@sources.redhat.com Received: (qmail 32529 invoked from network); 6 Mar 2003 04:33:14 -0000 Received: from unknown (HELO ms-smtp-02.southeast.rr.com) (24.93.67.83) by 172.16.49.205 with SMTP; 6 Mar 2003 04:33:14 -0000 Received: from mail4.nc.rr.com (fe4 [24.93.67.51]) by ms-smtp-02.southeast.rr.com (8.12.5/8.12.2) with ESMTP id h264VgbB017879; Wed, 5 Mar 2003 23:31:42 -0500 (EST) Received: from lyta.haphazard.org ([66.57.9.48]) by mail4.nc.rr.com with Microsoft SMTPSVC(5.5.1877.757.75); Wed, 5 Mar 2003 23:34:38 -0500 Received: by lyta.haphazard.org (Postfix, from userid 500) id C1AEEBE69E; Wed, 5 Mar 2003 23:32:54 -0500 (EST) To: "Patrick Ellis" Cc: Subject: Re: Question about PipedInputStream available method References: From: Brian Jones Date: Thu, 06 Mar 2003 04:33:00 -0000 In-Reply-To: Message-ID: User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2003-q1/txt/msg00034.txt.bz2 "Patrick Ellis" writes: > > In the gnu/testlet/java/io/PipedStream/Test.java code, there is a > call to method available() which Returns the number of bytes that > can be read from this input stream without blocking. The first call > to the method returns zero which causes the test to fail. Should the > code be change to harness.check(pis.available() >= 0, > "available()"); > > > > // Now set up our reader > PipedInputStream pis = new PipedInputStream(); > pis.connect(pos); > new Thread(pstw).start(); > harness.check(pis.available() > 0, "available()"); > > Pat Ellis > SDE Build and Test Team > Phone: (919) 531-0355 > R2263 Patrick.Ellis@sas.com > SAS... The Power to Know > > Check to see if you have updated Mauve since Mark committed this fix... 2003-02-14 Mark Wielaard * gnu/testlet/java/io/PipedStream/PipedStreamTestWriter.java (ready): New field. (waitTillReady): New method. (run): Set ready field. * gnu/testlet/java/io/PipedStream/Test.java (test): Call waitTillReady before testing available(). Brian -- Brian Jones