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

JUnit47 provider reports incorrect elapsed time on test failure.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.11
    • 2.11
    • None
    • all

    Description

      A test like this one:

      public class Test0 {
      
        @Test
        public void testT0() throws Exception {
          Assert.assertTrue(false);
        }
      }
      

      will report this with JUnit47:

      Running Test0
      Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 1,414,930.38 sec <<< FAILURE!
      

      This fix is in TestMethod#testFailure, adding "setEndTime();". It becomes

          public void testFailure( ReportEntry failure )
          {
              this.testFailure = failure;
              setEndTime();
          }
      

      I don't think there is any side effect.

      Attachments

        Activity

          People

            krosenvold Kristian Rosenvold
            nkeywal Nicolas Liochon
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: