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

Fork x parallel JVMs once

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.12
    • 2.13
    • process forking
    • None

    Description

      In 2.12 a new forkMode "perthread" was introduced, which (in conjunction with parallel!=none) behaves like a parallel "always"-forkMode.
      So for instance parallel=classes and forkMode=perthread fork x JVMs in parallel, whereas each JVM executes just one test class and then terminates.

      It would come in handy if there was another new forkMode (like "perthreadOnce" or similar) which forks x JVMs that keep on executing test classes (parallel=classes) until there are no more test-classes left to execute.

      Example (all with parallel=classes and threadCount=2) with 4 test classes (Test1-4):

      perthread:
      JVM1 is forked for Test1
      JVM2 is forked for Test2
      JVM1 for Test1 terminates
      JVM2 for Test2 terminates
      JVM3 is forked for Test3
      JVM4 is forked for Test4
      JVM4 for Test3 terminates
      JVM3 for Test3 terminates

      perthreadOnce (or the like):
      JVM1 is forked, executes Test1
      JVM2 is forked, executes Test2
      JVM1 executes Test3
      JVM2 executes Test4
      JVM1 terminates
      JVM2 terminates

      In reality, the order of events can differ of course.

      Attachments

        Issue Links

          Activity

            People

              krosenvold Kristian Rosenvold
              famod Falko Modler
              Votes:
              2 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: