hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrey Klochkov (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HADOOP-8755) Print thread dump when tests fail due to timeout
Date Tue, 04 Sep 2012 17:45:08 GMT

    [ https://issues.apache.org/jira/browse/HADOOP-8755?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13447843#comment-13447843
] 

Andrey Klochkov commented on HADOOP-8755:
-----------------------------------------

Hi Aaron,
You're right - changing this timeout wouldn't help. There are 2 timeouts for test execution
time: one in surefire and another is in junit. Surefire just kills a child process when timeout
is exceeded, and this patch doesn't handle this. What's handled is if a test method is annotated
with @Test and the timeout parameter is given, then junit will fail the test and thread dump
will be printed. TestFileAppend4 is an example of a test providing timeout parameter. 

When testing the patch I reduced timeout in TestFileAppend4 and validated that thread dump
is presented in the test output file.

AFAIK we can't really do anything with the surefire timeout. Still we may have thread dumps
printed for all tests in case of timeouts if we introduce a default timeout for all tests
on the junit level. I guess it is doable with a custom surefire provider for junit, but I'm
not sure we really need this. What do you think?  
                
> Print thread dump when tests fail due to timeout 
> -------------------------------------------------
>
>                 Key: HADOOP-8755
>                 URL: https://issues.apache.org/jira/browse/HADOOP-8755
>             Project: Hadoop Common
>          Issue Type: Improvement
>          Components: test
>    Affects Versions: 1.0.3, 0.23.1, 2.0.0-alpha
>            Reporter: Andrey Klochkov
>            Assignee: Andrey Klochkov
>         Attachments: HDFS-3762-branch-0.23.patch, HDFS-3762.patch, HDFS-3762.patch, HDFS-3762.patch,
HDFS-3762.patch, HDFS-3762.patch
>
>
> When a test fails due to timeout it's often not clear what is the root cause. See HDFS-3364
as an example.
> We can print dump of all threads in this case, this may help finding causes.

--
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

Mime
View raw message