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

Groups are ignored if test are executed in parallel mode

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.12
    • 2.12.1
    • None
    • Linux 3.0.0-15-generic #26-Ubuntu SMP x86_64 x86_64 x86_64 GNU/Linux
      Junit 4.10

    Description

      Hi!

      We have a maven-project containing multiple modules. Our junit tests are annotated with categories (@Category annotation). If we start the test with:

      mvn clean verify -Dgroups=org.example.MyCategory

      everything works as expected (only MyCategory-annotated tests are executed).

      But in parallel mode all tests are executed!

      I have attached an example project to demonstrate the bug.
      When executing:

      mvn clean verify -Dgroups=org.example.MyCategory

      two test are executed.
      When executing:

      mvn clean verify -Dgroups=org.example.MyCategory -Pparallel

      four tests are executed.

      The parallel profile looks like this:

          <profile>
            <id>parallel</id>
            <build>
              <plugins>
                <plugin>
                  <groupId>org.apache.maven.plugins</groupId>
                  <artifactId>maven-failsafe-plugin</artifactId>
                  <version>2.12</version>
                  <configuration>
                    <parallel>methods</parallel>
                    <threadCount>2</threadCount>
                    <perCoreThreadCount>false</perCoreThreadCount>
                  </configuration>
                </plugin>
              </plugins>
            </build>
          </profile>
      

      Attachments

        1. bugexample.zip
          11 kB
          Mario Krautz
        2. surefire834_integrationtest.patch
          13 kB
          Mario Krautz
        3. test-playground.tar.gz
          2 kB
          Mario Krautz
        4. test-playground.tar.gz
          2 kB
          Mario Krautz

        Activity

          People

            Unassigned Unassigned
            mkrautz Mario Krautz
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: