Re: Testlistener Events in JUnit Slows Down Forked Tests in 1.8.x

2010-08-19 Thread Jesse Glick
On 08/19/2010 08:25 AM, Stefan Bodewig wrote: I've added an attribute to enable the events (defaults to false) and a magic property that overrides the attribute setting. OK, though I still think the attribute is useless since the only known use case is for container control.

Re: Testlistener Events in JUnit Slows Down Forked Tests in 1.8.x

2010-08-19 Thread Stefan Bodewig
On 2010-08-11, Jesse Glick wrote: > On 08/10/2010 03:00 PM, Stefan Bodewig wrote: >> buffering on the testrunner side would help but at the same time make >> the lines unusable for the test listener events that must happen in >> step with the test to be useful. > It would suffice for test listen

Re: Testlistener Events in JUnit Slows Down Forked Tests in 1.8.x

2010-08-11 Thread Jesse Glick
On 08/10/2010 03:00 PM, Stefan Bodewig wrote: buffering on the testrunner side would help but at the same time make the lines unusable for the test listener events that must happen in step with the test to be useful. It would suffice for test listener events to be delivered fairly soon after th

Re: Testlistener Events in JUnit Slows Down Forked Tests in 1.8.x

2010-08-10 Thread Stefan Bodewig
On 2010-08-10, Danny Yates wrote: > Sorry, I didn't make myself clear. I was actually thinking of using a read > timeout so that the read call returns periodically and you can test > interrupted(), but on reflection, you can only do that with sockets. I think you will be able to do that with NIO2

Re: Testlistener Events in JUnit Slows Down Forked Tests in 1.8.x

2010-08-10 Thread Danny Yates
Sorry, I didn't make myself clear. I was actually thinking of using a read timeout so that the read call returns periodically and you can test interrupted(), but on reflection, you can only do that with sockets. I'll get my coat... ;-) On 10 August 2010 20:45, Stefan Bodewig wrote: > On 2010-0

Re: Testlistener Events in JUnit Slows Down Forked Tests in 1.8.x

2010-08-10 Thread Stefan Bodewig
On 2010-08-10, Danny Yates wrote: > Why does the StreamPumper poll like that? So it can be interrupted. > Surely it should just block reading the InputStream? It used to do just that. On Windows if a process spawns children (grandchildren of Ant in this case) they inherit the streams of their

Re: Testlistener Events in JUnit Slows Down Forked Tests in 1.8.x

2010-08-10 Thread Danny Yates
Why does the StreamPumper poll like that? Surely it should just block reading the InputStream? To deal with InterruptedException, you can just do a timed read and test the interrupted flag before looping back to the blocking read. Danny. On 10 August 2010 20:00, Stefan Bodewig wrote: > On 201

Re: Testlistener Events in JUnit Slows Down Forked Tests in 1.8.x

2010-08-10 Thread Stefan Bodewig
On 2010-08-10, Jesse Glick wrote: > On 08/09/2010 03:42 AM, Stefan Bodewig wrote: >> I plan to add an disableTestListenerEvents > First I would like to hear an explanation of why printing a few lines > to System.out causes such a big performance hit and why this cannot be > fixed. "such a big" i

Re: Testlistener Events in JUnit Slows Down Forked Tests in 1.8.x

2010-08-10 Thread Jesse Glick
On 08/09/2010 03:42 AM, Stefan Bodewig wrote: I plan to add an disableTestListenerEvents First I would like to hear an explanation of why printing a few lines to System.out causes such a big performance hit and why this cannot be fixed. What is waiting for what to finish? Does the problem only

Re: Testlistener Events in JUnit Slows Down Forked Tests in 1.8.x

2010-08-09 Thread Dominique Devienne
On Mon, Aug 9, 2010 at 2:42 AM, Stefan Bodewig wrote: > The short story is that with the changed StreamPumper code and > useAvailable=true forked JUnit tests now take a longer time because the > test time is influenced by the time it takes to send the output for test > events back to Ant. > > For

Testlistener Events in JUnit Slows Down Forked Tests in 1.8.x

2010-08-09 Thread Stefan Bodewig
Hi all, The short story is that with the changed StreamPumper code and useAvailable=true forked JUnit tests now take a longer time because the test time is influenced by the time it takes to send the output for test events back to Ant. For more background