You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Robert Sandiford (Jira)" <ji...@apache.org> on 2021/08/31 16:34:00 UTC

[jira] [Commented] (SUREFIRE-1911) Groovy-based JUnit 4 tests no longer run w/ 5 in classpath

    [ https://issues.apache.org/jira/browse/SUREFIRE-1911?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17407518#comment-17407518 ] 

Robert Sandiford commented on SUREFIRE-1911:
--------------------------------------------

Perhaps related.  Using Spring Boot 2.5.4, with maven-surefire-plugin 3.0.0.M5, and spring-boot-starter-test.

Unit tests won't run - same output as above, 0 tests run, 0 failures, 0 errors.

changing to maven-surefire-plugin 3.0.0.M4 works fine.  (This was detected while upgrading dependencies in an existing maven based project).

I was able to work around the issue by changing the spring-boot-starter-test dependency to exclude the junit components, like this:
{quote}{{<dependency>}}
{{    <groupId>org.springframework.boot</groupId>}}
{{    <artifactId>spring-boot-starter-test</artifactId>}}
{{    <version>${spring-boot.version}</version>}}
{{    <exclusions>}}
{{        <exclusion>}}
{{            <groupId>org.junit.jupiter</groupId>}}
{{            <artifactId>junit-jupiter</artifactId>}}
{{         </exclusion>}}
{{         <exclusion>}}
{{             <groupId>org.mockito</groupId>}}
{{            <artifactId>mockito-junit-jupiter</artifactId>}}
{{        </exclusion>}}
{{    </exclusions>}}
{{</dependency>}}{quote}

> Groovy-based JUnit 4 tests no longer run w/ 5 in classpath
> ----------------------------------------------------------
>
>                 Key: SUREFIRE-1911
>                 URL: https://issues.apache.org/jira/browse/SUREFIRE-1911
>             Project: Maven Surefire
>          Issue Type: Bug
>          Components: Junit 4.x support, Maven Surefire Plugin
>    Affects Versions: 3.0.0-M5
>            Reporter: Jesse Glick
>            Assignee: Tibor Digana
>            Priority: Major
>              Labels: regression
>
> Using Maven 3.8.1 and JDK 8, https://github.com/jenkins-infra/pipeline-library/commit/48fc69bdd3f7e3adbebea76b8bf68edfe5ed3e32 causes {{mvn test}} to not do anything:
> {code:none}
> Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
> {code}
> In 3.0.0-M3, or for that matter 3.0.0-M4, this runs a variety of tests as expected. {{git bisect}} points to the fix of SUREFIRE-1787 as the culprit:
> {code:none}
> d5bbb3f9ae37ff5ad2bb7e8b3c11d1f24ea6f041 is the first bad commit
> commit d5bbb3f9ae37ff5ad2bb7e8b3c11d1f24ea6f041
> Author: tibordigana <ti...@apache.org>
> Date:   Sat May 2 13:08:16 2020 +0200
>     [SUREFIRE-1787] Support multiple runners (JUnit4, TestNG, other) and their API in JUnit5 Provider
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)