You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Michael Osipov (Jira)" <ji...@apache.org> on 2024/08/16 12:26:00 UTC
[jira] [Comment Edited] (SUREFIRE-2255) [REGRESSION] Maven Build ist after upgrading to JUnit Jupiter V5.11.0 broken
[ https://issues.apache.org/jira/browse/SUREFIRE-2255?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17874219#comment-17874219 ]
Michael Osipov edited comment on SUREFIRE-2255 at 8/16/24 12:25 PM:
--------------------------------------------------------------------
Please create a ticket with the JUnit team and what their advise is.
was (Author: michael-o):
Please create a ticket with the JUnit team and what their advise ist.
> [REGRESSION] Maven Build ist after upgrading to JUnit Jupiter V5.11.0 broken
> ----------------------------------------------------------------------------
>
> Key: SUREFIRE-2255
> URL: https://issues.apache.org/jira/browse/SUREFIRE-2255
> Project: Maven Surefire
> Issue Type: Bug
> Components: JUnit 5.x support
> Affects Versions: 3.3.1
> Environment: Spring Test with JUnit5 5.11.0 and surefire 3.3.1
> Reporter: Manuel s
> Priority: Major
>
> Hi Folks,
> After upgrading maven dependency to v5.11.0 of JUnit engine in my project the maven build will be broken.
> I have suppossed it is a regression problem, because i have changed only the JUnit Version from 5.10.3 (which is working) to the 5.11.0 (which is broken).
> After some analyse, root of the problem is a NoSuchMethodError after calling the LazyLauncher.discover methode
> .NoSuchMethodError: 'boolean org.junit.platform.commons.util.ReflectionUtils.returnsPrimitiveVoid(java.lang.reflect.Method)'
> See Message in the ticket.
> I am posting the ticket hier because without source code changes the build is broken only with a JUnit update from 5.10.3 to 5.11.0.
> In the [usage-website|https://maven.apache.org/surefire/maven-surefire-plugin/usage.html] of maven surefire plugin ist 5.x but when i looked into the pom.xml of the surefire-providers/surefire-junit-platform [https://github.com/apache/maven-surefire/blob/master/surefire-providers/surefire-junit-platform/pom.xml#L83] the version ist up to 5.9.3.
> So maybe is a regression-test-problem.
> At the moment i had to go back to the version 5.10.3.
> Please if the problem should be fixed by the JUnit Folks let me know. I am not sure and the problem could be by them.
> In anycase you could maybe test if after an update in the pom of [https://github.com/apache/maven-surefire/blob/master/surefire-providers/surefire-junit-platform/pom.xml#L83] to JUnit 5.11.0 the test are passed
>
> *Message:*
> _Caused by: org.apache.maven.surefire.booter.SurefireBooterForkException: There was an error in the forked process_
> _TestEngine with ID 'junit-jupiter' failed to discover tests_
> _org.junit.platform.commons.JUnitException: TestEngine with ID 'junit-jupiter' failed to discover tests_
> _at org.junit.platform.launcher.core.EngineDiscoveryOrchestrator.discoverEngineRoot(EngineDiscoveryOrchestrator.java:160)_
> _at org.junit.platform.launcher.core.EngineDiscoveryOrchestrator.discoverSafely(EngineDiscoveryOrchestrator.java:132)_
> _at org.junit.platform.launcher.core.EngineDiscoveryOrchestrator.discover(EngineDiscoveryOrchestrator.java:107)_
> _at org.junit.platform.launcher.core.EngineDiscoveryOrchestrator.discover(EngineDiscoveryOrchestrator.java:78)_
> _at org.junit.platform.launcher.core.DefaultLauncher.discover(DefaultLauncher.java:99)_
> _at org.junit.platform.launcher.core.DefaultLauncher.discover(DefaultLauncher.java:77)_
> _at org.junit.platform.launcher.core.DelegatingLauncher.discover(DelegatingLauncher.java:42)_
> _at org.apache.maven.surefire.junitplatform.LazyLauncher.discover(LazyLauncher.java:50)_
> _at org.apache.maven.surefire.junitplatform.TestPlanScannerFilter.accept(TestPlanScannerFilter.java:52)_
> _at org.apache.maven.surefire.api.util.DefaultScanResult.applyFilter(DefaultScanResult.java:87)_
> _at org.apache.maven.surefire.junitplatform.JUnitPlatformProvider.scanClasspath(JUnitPlatformProvider.java:142)_
> _at org.apache.maven.surefire.junitplatform.JUnitPlatformProvider.invoke(JUnitPlatformProvider.java:122)_
> _at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:385)_
> _at org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:162)_
> _at org.apache.maven.surefire.booter.ForkedBooter.run(ForkedBooter.java:507)_
> _at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:495)_
> _Caused by: org.junit.platform.commons.JUnitException: ClassSelector [className = 'xxxxclassxxxxmyproject', classLoader = null] resolution failed_
> _at org.junit.platform.launcher.listeners.discovery.AbortOnFailureLauncherDiscoveryListener.selectorProcessed(AbortOnFailureLauncherDiscoveryListener.java:39)_
> _at org.junit.platform.engine.support.discovery.EngineDiscoveryRequestResolution.resolveCompletely(EngineDiscoveryRequestResolution.java:103)_
> _at org.junit.platform.engine.support.discovery.EngineDiscoveryRequestResolution.run(EngineDiscoveryRequestResolution.java:83)_
> _at org.junit.platform.engine.support.discovery.EngineDiscoveryRequestResolver.resolve(EngineDiscoveryRequestResolver.java:113)_
> _at org.junit.jupiter.engine.discovery.DiscoverySelectorResolver.resolveSelectors(DiscoverySelectorResolver.java:48)_
> _at org.junit.jupiter.engine.JupiterTestEngine.discover(JupiterTestEngine.java:69)_
> _at org.junit.platform.launcher.core.EngineDiscoveryOrchestrator.discoverEngineRoot(EngineDiscoveryOrchestrator.java:152)_
> _... 15 more_
> _Caused by: java.lang.NoSuchMethodError: 'boolean org.junit.platform.commons.util.ReflectionUtils.returnsPrimitiveVoid(java.lang.reflect.Method)'_
> _at org.junit.jupiter.engine.discovery.predicates.IsTestableMethod.test(IsTestableMethod.java:48)_
> _at org.junit.jupiter.engine.discovery.predicates.IsTestMethod.test(IsTestMethod.java:23)_
> _at org.junit.jupiter.engine.discovery.predicates.IsTestableMethod.test(IsTestableMethod.java:26)_
--
This message was sent by Atlassian Jira
(v8.20.10#820010)