[
https://issues.apache.org/jira/browse/HADOOP-9112?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13583079#comment-13583079
]
Steve Loughran commented on HADOOP-9112:
----------------------------------------
sorry, I've only just seen this. As the only person on *-dev whose ever written
>1 JUnit test runner, I do encourage people to point me at these kind of JIRAs.
Timing out tests without explicit {{timeout}} attributes are probably dealt
with by having maven killing the JUnit running process. Due to the (historical,
flawed) fact that the XML results stick the summary data up as attributes on
the root XML node, XML report generators have to buffer up the entire file
before writing. Killed process => no output. Text reporters shouldn't have this
problem, a past XHTML reporter I did would stream HTML out and provide
something useful, along with colour coding log4j outputs based on severity
levels.
[OneHostHtmlListener|http://smartfrog.svn.sourceforge.net/viewvc/smartfrog/trunk/core/components/xunit/src/org/smartfrog/services/xunit/listeners/html/OneHostHtmlListener.java?revision=8886&view=markup]
. Fixing the Ant-originated XML and tooling would be the ideal outcome here,
just hard, as you have to not just delve into Ant and Maven code, but into
downstream tools like Jenkins.
One problem with timeout= attributes is that they can be very brittle -my test
running machine may be slower than yours. We need a standard recommended (long)
test run time, which should be minutes, just to ensure that the Maven JUnit4
runner runs it in timeout mode. It doesn't matter what the timeout is as long
as it is >0, less than the time it takes to complete on everyones boxes/VMs,
and less than the absolute maven test run timeout.
Once the {{@Test(timeout)}} property is set, themselves can raise
{{TimeoutException}}, which is translated into a timeout -so permitting tests
to implement their own (property-configurable) timeout logic.
> test-patch should -1 for @Tests without a timeout
> -------------------------------------------------
>
> Key: HADOOP-9112
> URL: https://issues.apache.org/jira/browse/HADOOP-9112
> Project: Hadoop Common
> Issue Type: Improvement
> Reporter: Todd Lipcon
> Assignee: Surenkumar Nihalani
> Fix For: 3.0.0
>
> Attachments: HADOOP-9112-1.patch, HADOOP-9112-2.patch,
> HADOOP-9112-3.patch, HADOOP-9112-4.patch, HADOOP-9112-5.patch,
> HADOOP-9112-6.patch, HADOOP-9112-7.patch
>
>
> With our current test running infrastructure, if a test with no timeout set
> runs too long, it triggers a surefire-wide timeout, which for some reason
> doesn't show up as a failed test in the test-patch output. Given that, we
> should require that all tests have a timeout set, and have test-patch enforce
> this with a simple check
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira