Maven Surefire
  1. Maven Surefire
  2. SUREFIRE-798

JUnit47 provider could print immediatly the test class name, as JUnit4, instead of waiting for the test to finish.

    Details

    • Type: Improvement Improvement
    • Status: Open Open
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: 2.10
    • Fix Version/s: None
    • Labels:
      None
    • Environment:
      all
    • Complexity:
      Intermediate
    • Number of attachments :
      0

      Description

      With a test that takes some time, for example

      public class Test0 {
        @Test
        public void testT0() throws Exception {
          Thread.sleep(6000);
        }
      }
      

      With JUnit4, we have first

      Running Test0

      Then, 6 seconds later

      Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 6.002 sec

      With JUnit47, we wait for 6 seconds, then the two lines appear simultaneously.

      The former behavior is better, because it allows to kill the test if we know that this test should not take so long. It also gives the feeling that you know what's going on .

        Activity

        Hide
        Kristian Rosenvold added a comment -

        I assume you're thinking about /when running in serial/ ? For all kinds of parallel, the current behaviour will not change, since it keeps output linear.

        Show
        Kristian Rosenvold added a comment - I assume you're thinking about /when running in serial/ ? For all kinds of parallel, the current behaviour will not change, since it keeps output linear.
        Hide
        Nicolas Liochon added a comment -

        Yes, it's when running in serial. I understand that in parallel you want to keep them together, it makes sense...

        Show
        Nicolas Liochon added a comment - Yes, it's when running in serial. I understand that in parallel you want to keep them together, it makes sense...
        Hide
        Nicolas Liochon added a comment -

        As a side effect as well, note that when a forked process timeouts with JUnit47, there is no entry in the console at all. The final status says 'failure or timeout', but there is no direct way to find out which one of the test timeouted.

        Show
        Nicolas Liochon added a comment - As a side effect as well, note that when a forked process timeouts with JUnit47, there is no entry in the console at all. The final status says 'failure or timeout', but there is no direct way to find out which one of the test timeouted.

          People

          • Assignee:
            Unassigned
            Reporter:
            Nicolas Liochon
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated: