You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Steve Loughran (JIRA)" <ji...@codehaus.org> on 2013/02/22 12:22:13 UTC

[jira] (SUREFIRE-966) Add ability to set a default timeout on all JUnit4 tests that don't set one explicitly

Steve Loughran created SUREFIRE-966:
---------------------------------------

             Summary: Add ability to set a default timeout on all JUnit4 tests that don't set one explicitly
                 Key: SUREFIRE-966
                 URL: https://jira.codehaus.org/browse/SUREFIRE-966
             Project: Maven Surefire
          Issue Type: Improvement
          Components: Junit 4.x support
    Affects Versions: 2.13
            Reporter: Steve Loughran
            Priority: Minor


add ability to set a default timeout on for JUnit4 tests that don't set one in their attributes

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] (SUREFIRE-966) Add ability to set a default timeout on all JUnit4 tests that don't set one explicitly

Posted by "Steve Loughran (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/SUREFIRE-966?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=320278#comment-320278 ] 

Steve Loughran commented on SUREFIRE-966:
-----------------------------------------

Over in Hadoop, we're seeing a problem with the fact that when the tests time out, the process gets killed, but the report is then incomplete [ https://issues.apache.org/jira/browse/HADOOP-9112 ] . A solution for this is to set a  {{timeout=something}} value in the JUnit4 {{@Test}} declaration, after which Surefire runs it with a per-test timeout, and reports timeouts better. This is currently being rolled out into Hadoop, but it comes at the price of hard coding a timeout into all the source files -brittle against different test machines, and makes it near-impossible to debug a test case. And it forces us to retrofit the agreed upon timeout value into all test cases.

Could we have a way of specifying the default JUnit4 timeout, so that whenever the test runner sees timeout=0 in the attribute, it swaps it for whatever timeout that build/user has chosen?
                
> Add ability to set a default timeout on all JUnit4 tests that don't set one explicitly
> --------------------------------------------------------------------------------------
>
>                 Key: SUREFIRE-966
>                 URL: https://jira.codehaus.org/browse/SUREFIRE-966
>             Project: Maven Surefire
>          Issue Type: Improvement
>          Components: Junit 4.x support
>    Affects Versions: 2.13
>            Reporter: Steve Loughran
>            Priority: Minor
>
> add ability to set a default timeout on for JUnit4 tests that don't set one in their attributes

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] (SUREFIRE-966) Add ability to set a default timeout on all JUnit4 tests that don't set one explicitly

Posted by "Kristian Rosenvold (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/SUREFIRE-966?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=320333#comment-320333 ] 

Kristian Rosenvold commented on SUREFIRE-966:
---------------------------------------------

Surefire has the timeout on the fork, which could be used in conjunction with forkMode=always to get individually controlled results. Technically the report for a timed out test /should/ be correct, so if it is not, that is a bug.

(The code/logic around the timeout logic is a real PITA to test, so any bugs in this area do not surprise me).

I had some indications in private email that the problem MIGHT be that surefire does not correctly report status for the testcase that is being run at the instant it times out. This sounds like a bug. We should be reporting status for the current testcase when we terminate due to timeouts. Please consider adapting surefire-integratuion-tests/src/test/resources/fork-timeout/ and the corresponding IT to illustrate this problem.


                
> Add ability to set a default timeout on all JUnit4 tests that don't set one explicitly
> --------------------------------------------------------------------------------------
>
>                 Key: SUREFIRE-966
>                 URL: https://jira.codehaus.org/browse/SUREFIRE-966
>             Project: Maven Surefire
>          Issue Type: Improvement
>          Components: Junit 4.x support
>    Affects Versions: 2.13
>            Reporter: Steve Loughran
>            Priority: Minor
>
> add ability to set a default timeout on for JUnit4 tests that don't set one in their attributes

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] (SUREFIRE-966) Add ability to set a default timeout on all JUnit4 tests that don't set one explicitly

Posted by "Kristian Rosenvold (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/SUREFIRE-966?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=320334#comment-320334 ] 

Kristian Rosenvold commented on SUREFIRE-966:
---------------------------------------------

As for the topic of this issue, it sounds like a feature request for junit
                
> Add ability to set a default timeout on all JUnit4 tests that don't set one explicitly
> --------------------------------------------------------------------------------------
>
>                 Key: SUREFIRE-966
>                 URL: https://jira.codehaus.org/browse/SUREFIRE-966
>             Project: Maven Surefire
>          Issue Type: Improvement
>          Components: Junit 4.x support
>    Affects Versions: 2.13
>            Reporter: Steve Loughran
>            Priority: Minor
>
> add ability to set a default timeout on for JUnit4 tests that don't set one in their attributes

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira