Uploaded image for project: 'Maven Surefire'
  1. Maven Surefire
  2. SUREFIRE-1745

Global Junit Test timeout

    XMLWordPrintableJSON

    Details

    • Type: New Feature
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 3.0.0-M4
    • Fix Version/s: None
    • Component/s: Maven Surefire Plugin
    • Labels:
      None

      Description

      Hi,

      We need unit test level time-out similar to this https://github.com/junit-team/junit4/wiki/Timeout-for-tests  in surefire where we can configure a timeout similar to parallelTestsTimeoutForcedInSeconds

      Also, I've observed that parallelTestsTimeoutForcedInSeconds is not able to stop the infinite loop kind of test, and for other kinds of test even after timeout error in the log, the test is marked as successful in the surefire report.

       

      Can we have something similar to Junit timeout in surefire where we can configure global test timeout which will only stop that particular test which takes more than configured time and mark it as timeout error in the report, without impacting/stopping any other test's execution?

      @Test
      public void infiniteLoop(){
       while (true) {}
       }
      
      

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              kishoretak Kishore Kumar
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: