You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Brian Fitzpatrick <bm...@opentext.com> on 2005/07/01 22:01:00 UTC

junit timeout bug

When a <junit> timeout occurs, the formatter log files do not contain
the logs of the test, though if you use "showoutput=true" the logs are
visible on the console. This seems to be a bug to me, but I wanted to
confirm it before reporting it.

If I have a formatter set up for the <junit> task and a timeout occurs
during a test execution, then the log output of the test does not appear
in the formatter text file.  However, if I specify "showoutput=true" in
the <junit> task, then the output of the test appears in the console.

<junit
	printsummary="true"
	fork="true"
	dir="${ecm.basedir}"
	haltonfailure="true"
	failureproperty="test.failed"
	timeout="600000"
	maxmemory="1024m"
	showoutput="${junit.showoutput}">

	<formatter type="brief" />
	<formatter type="xml" />

If a timeout occurs after 10 minutes, the *.TXT and *.XML files of the
formatter do not contain any log output. They only have a couple of
lines indicating that a timeout occurred.

However, if I set showoutput to true, then the console contains all of
the logging data of the test prior to the timeout, which makes it much
easier to figure out why the test timed out.

In our case, we use the MailLogger to send out the log, so we can't have
all the output going to the console, since it grows too large to be sent
via e-mail.

The doc for the showoutput attribute indicates that it should be the
same data that goes to the formatters:

Showoutput - Send any output generated by tests to Ant's logging system
as well as to the formatters. By default only the formatters receive the
output.

 

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org