This is the mail archive of the
mauve-discuss@sources.redhat.com
mailing list for the Mauve project.
Re: Question about PipedInputStream available method
- From: Brian Jones <cbj at gnu dot org>
- To: "Patrick Ellis" <Patrick dot Ellis at sas dot com>
- Cc: <mauve-discuss at sources dot redhat dot com>
- Date: 05 Mar 2003 23:32:54 -0500
- Subject: Re: Question about PipedInputStream available method
- References: <F2E670D5036BE14E89473A3FAEDE6ACE428FA0@merc18.na.sas.com>
"Patrick Ellis" <Patrick dot Ellis at sas dot com> 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 dot Ellis at sas dot com
> SAS... The Power to Know
>
>
Check to see if you have updated Mauve since Mark committed this
fix...
2003-02-14 Mark Wielaard <mark at klomp dot org>
* 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 <cbj at gnu dot org>