[Closed] (SUREFIRE-1583) surefire 2.22.0 does not work with forkCount > 0 and junit 5.3.x

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[Closed] (SUREFIRE-1583) surefire 2.22.0 does not work with forkCount > 0 and junit 5.3.x

JIRA jira@apache.org

     [ https://issues.apache.org/jira/browse/SUREFIRE-1583?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tibor Digana closed SUREFIRE-1583.
----------------------------------
    Resolution: Resolved
      Assignee: Tibor Digana

Fixed in 2.22.1.

> surefire 2.22.0 does not work with forkCount > 0 and junit 5.3.x
> ----------------------------------------------------------------
>
>                 Key: SUREFIRE-1583
>                 URL: https://issues.apache.org/jira/browse/SUREFIRE-1583
>             Project: Maven Surefire
>          Issue Type: Bug
>          Components: JUnit 5.x support, Maven Surefire Plugin
>    Affects Versions: 2.22.0
>         Environment: MacOS X, Maven 3.5.4, Java 8_181
>            Reporter: Henning Schmiedehausen
>            Assignee: Tibor Digana
>            Priority: Blocker
>
> * clone the junit test examples from [hidden email]:junit-team/junit5-samples.git
>  * go to the junit5-samples/junit5-jupiter-starter-maven folder
>  * checkout the 5.2.0 version:   git checkout -b 5.2.0 origin/r5.2.0
>  * edit the pom file to read:
> {{<plugin>}}
> {{  <artifactId>maven-surefire-plugin</artifactId>}}
> {{  <version>2.22.0</version>}}
> {{  <configuration>}}
> {{    <forkCount>1</forkCount>}}
> {{  </configuration>}}
> {{</plugin>}}
>  * Run 'mvn clean test' -> The tests are run
>  * change the forkCount to 2., run 'mvn clean test' again. -> The tests are run
> => junit 5.2.0 works with surefire 2.22.0
>  * Now checkout the 5.3.0 version (or 5.3.1 version): git checkout -b 5.3.0 origin/r5.3.0
>  * Make the same change to the pom, use forkCount value 1
>  * Run 'mvn clean test' -> The tests are run
>  * Use forkCount value 2, run 'mvn clean test' -> The tests are *not* run.
> -> junit 5.3.x does not work with surefire 2.22.0
> Capturing full mvn -X output yields only a single difference in the logs:
>  
> {{[DEBUG] Determined Maven Process ID 66290}}
> {{[DEBUG] boot classpath: /Users/hschmiedehausen/.m2/repository/org/apache/maven/surefire/surefire-booter/2.22.0/surefire-booter-2.22.0.jar /Users/hschmiedehausen/.m2/repository/org/apache/maven/surefire/surefire-api/2.22.0/surefire-api-2.22.0.jar /Users/hschmiedehausen/.m2/repository/org/apache/maven/surefire/surefire-logger-api/2.22.0/surefire-logger-api-2.22.0.jar /Users/hschmiedehausen/scratch/junit5-samples/junit5-jupiter-starter-maven/target/test-classes /Users/hschmiedehausen/scratch/junit5-samples/junit5-jupiter-starter-maven/target/classes /Users/hschmiedehausen/.m2/repository/org/junit/jupiter/junit-jupiter-api/5.3.1/junit-jupiter-api-5.3.1.jar /Users/hschmiedehausen/.m2/repository/org/apiguardian/apiguardian-api/1.0.0/apiguardian-api-1.0.0.jar /Users/hschmiedehausen/.m2/repository/org/opentest4j/opentest4j/1.1.1/opentest4j-1.1.1.jar /Users/hschmiedehausen/.m2/repository/org/junit/platform/junit-platform-commons/1.3.1/junit-platform-commons-1.3.1.jar /Users/hschmiedehausen/.m2/repository/org/junit/jupiter/junit-jupiter-params/5.3.1/junit-jupiter-params-5.3.1.jar /Users/hschmiedehausen/.m2/repository/org/junit/jupiter/junit-jupiter-engine/5.3.1/junit-jupiter-engine-5.3.1.jar /Users/hschmiedehausen/.m2/repository/org/junit/platform/junit-platform-engine/1.3.1/junit-platform-engine-1.3.1.jar /Users/hschmiedehausen/.m2/repository/org/apache/maven/surefire/surefire-junit-platform/2.22.0/surefire-junit-platform-2.22.0.jar /Users/hschmiedehausen/.m2/repository/org/junit/platform/junit-platform-launcher/1.2.0/junit-platform-launcher-1.2.0.jar /Users/hschmiedehausen/.m2/repository/org/junit/platform/junit-platform-engine/1.2.0/junit-platform-engine-1.2.0.jar /Users/hschmiedehausen/.m2/repository/org/junit/platform/junit-platform-commons/1.2.0/junit-platform-commons-1.2.0.jar /Users/hschmiedehausen/.m2/repository/org/opentest4j/opentest4j/1.1.0/opentest4j-1.1.0.jar}}
> {{[DEBUG] boot(compact) classpath: surefire-booter-2.22.0.jar surefire-api-2.22.0.jar surefire-logger-api-2.22.0.jar test-classes classes junit-jupiter-api-5.3.1.jar apiguardian-api-1.0.0.jar opentest4j-1.1.1.jar junit-platform-commons-1.3.1.jar junit-jupiter-params-5.3.1.jar junit-jupiter-engine-5.3.1.jar junit-platform-engine-1.3.1.jar surefire-junit-platform-2.22.0.jar junit-platform-launcher-1.2.0.jar junit-platform-engine-1.2.0.jar junit-platform-commons-1.2.0.jar opentest4j-1.1.0.jar}}
> {{[DEBUG] Forking command line: /bin/sh -c cd /Users/hschmiedehausen/scratch/junit5-samples/junit5-jupiter-starter-maven && /Library/Java/JavaVirtualMachines/jdk1.8.0_181.jdk/Contents/Home/jre/bin/java -Xmx256m -Dfile.encoding=UTF-8 org.apache.maven.surefire.booter.ForkedBooter /Users/hschmiedehausen/scratch/junit5-samples/junit5-jupiter-starter-maven/target/surefire 2018-10-08T17-22-03_800-jvmRun1 surefire682835141025762671tmp surefire_08147820383697829015tmp}}
> {{[INFO] Running com.example.project.CalculatorTests}}
> {{[INFO] Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.082 s - in com.example.project.CalculatorTests}}
> {{[INFO]}}
> {{[INFO] Results:}}
> {{[INFO]}}
> {{[INFO] Tests run: 5, Failures: 0, Errors: 0, Skipped: 0}}
> for a working (forkCount value = 1) vs.
> {{[INFO]}}
> {{[INFO] Results:}}
> {{[INFO]}}
> {{[INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0}}
> {{[INFO] }}
> for a non-working (forkValue = 1.0C)
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)