Uploaded image for project: 'XWiki Commons'
  1. XWiki Commons
  2. XCOMMONS-555

Tests using a component manager rule fail when using Surefire's parallel mode

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Cannot Reproduce
    • Affects Version/s: 5.4.2
    • Fix Version/s: None
    • Labels:
      None
    • Similar issues:

      Description

      JUnit tests can be executed in parallel mode, with either suites, classes, or individual methods being distributed to one of the threads. When using components, mock expectations set for a test might interfere with the code being executed for another test. To (nondeterministically) try to reproduce the problem, simply add this for the surefire plugin configuration:

                  <parallel>classesAndMethods</parallel>
                  <threadCount>2</threadCount>
      

      It fails even with the weaker option <parallel>suites</parallel>.

      Being able to run tests in multiple threads would greatly speed up the build time.

        Attachments

          Activity

            People

            • Assignee:
              sdumitriu Sergiu Dumitriu
              Reporter:
              sdumitriu Sergiu Dumitriu
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Date of First Response: