This is the mail archive of the mailing list for the Mauve project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Question about PipedInputStream available method

"Patrick Ellis" <Patrick dot Ellis at sas dot com> writes:

> In the gnu/testlet/java/io/PipedStream/ 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

2003-02-14  Mark Wielaard  <mark at klomp dot org>

        * gnu/testlet/java/io/PipedStream/
        (ready): New field.
        (waitTillReady): New method.
        (run): Set ready field.
        * gnu/testlet/java/io/PipedStream/ (test): Call waitTillReady
        before testing available().

Brian Jones <cbj at gnu dot org>

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]