public inbox for mauve-discuss@sourceware.org
 help / color / mirror / Atom feed
* Question about PipedInputStream available method
@ 2003-03-05 22:47 Patrick Ellis
  2003-03-06  4:33 ` Brian Jones
  0 siblings, 1 reply; 2+ messages in thread
From: Patrick Ellis @ 2003-03-05 22:47 UTC (permalink / raw)
  To: mauve-discuss

     
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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Question about PipedInputStream available method
  2003-03-05 22:47 Question about PipedInputStream available method Patrick Ellis
@ 2003-03-06  4:33 ` Brian Jones
  0 siblings, 0 replies; 2+ messages in thread
From: Brian Jones @ 2003-03-06  4:33 UTC (permalink / raw)
  To: Patrick Ellis; +Cc: mauve-discuss

"Patrick Ellis" <Patrick.Ellis@sas.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.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  <mark@klomp.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@gnu.org>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-03-06  4:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-03-05 22:47 Question about PipedInputStream available method Patrick Ellis
2003-03-06  4:33 ` Brian Jones

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).