-
-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
7.20.0 regression: TestEngine with ID 'cucumber' failed to discover tests #2930
Comments
$ cat jhipster/jhipster-lite/target/surefire-reports/2024-10-05T16-15-25_011-jvmRun1.dump
# Created at 2024-10-05T16:15:26.116
org.junit.platform.commons.JUnitException: TestEngine with ID 'cucumber' 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: java.util.ServiceConfigurationError: io.cucumber.core.eventbus.UuidGenerator: Provider io.cucumber.core.eventbus.IncrementingUuidGenerator could not be instantiated
at java.base/java.util.ServiceLoader.fail(ServiceLoader.java:586)
at java.base/java.util.ServiceLoader$ProviderImpl.newInstance(ServiceLoader.java:813)
at java.base/java.util.ServiceLoader$ProviderImpl.get(ServiceLoader.java:729)
at java.base/java.util.ServiceLoader$3.next(ServiceLoader.java:1403)
at io.cucumber.core.runtime.UuidGeneratorServiceLoader.loadSingleUuidGeneratorOrDefault(UuidGeneratorServiceLoader.java:60)
at io.cucumber.core.runtime.UuidGeneratorServiceLoader.loadUuidGenerator(UuidGeneratorServiceLoader.java:46)
at io.cucumber.junit.platform.engine.FeatureResolver.createFeatureParser(FeatureResolver.java:69)
at io.cucumber.junit.platform.engine.FeatureResolver.<init>(FeatureResolver.java:59)
at io.cucumber.junit.platform.engine.FeatureResolver.create(FeatureResolver.java:78)
at io.cucumber.junit.platform.engine.DiscoverySelectorResolver.resolve(DiscoverySelectorResolver.java:67)
at io.cucumber.junit.platform.engine.DiscoverySelectorResolver.resolveSelectors(DiscoverySelectorResolver.java:53)
at io.cucumber.junit.platform.engine.CucumberTestEngine.discover(CucumberTestEngine.java:47)
at org.junit.platform.launcher.core.EngineDiscoveryOrchestrator.discoverEngineRoot(EngineDiscoveryOrchestrator.java:152)
... 15 more
Caused by: io.cucumber.core.exception.CucumberException: Out of IncrementingUuidGenerator capacity. Please reuse existing instances or use another UuidGenerator implementation instead.
at io.cucumber.core.eventbus.IncrementingUuidGenerator.<init>(IncrementingUuidGenerator.java:102)
at java.base/jdk.internal.reflect.DirectConstructorHandleAccessor.newInstance(DirectConstructorHandleAccessor.java:62)
at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:502)
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:486)
at java.base/java.util.ServiceLoader$ProviderImpl.newInstance(ServiceLoader.java:789)
... 26 more |
mpkorstanje
added a commit
that referenced
this issue
Oct 5, 2024
Even when not used, the `IncrementingUuidGenerator` is instantiated with each Cucumber execution. This somewhat fundamental to the way the `ServiceLoader` mechanism works. Each time an incrementing generator is created, a new session is started for that generator. This means that after 255 executions all sessions are exhausted. Unfortunately, when using the JUnit Platform, Maven issues a discovery request for each individual class. And Cucumber typically participates in discovery along with JUnit Jupiter. So after 255 classes, Cucumber fails discovery as seen in #2930. Fixes #2930.
7 tasks
mpkorstanje
added a commit
that referenced
this issue
Oct 5, 2024
Even when not used, the `IncrementingUuidGenerator` is instantiated with each Cucumber execution. This somewhat fundamental to the way the `ServiceLoader` mechanism works. Each time an incrementing generator is created, a new session is started for that generator. This means that after 255 executions all sessions are exhausted. Unfortunately, when using the JUnit Platform, Maven issues a discovery request for each individual class. And Cucumber typically participates in discovery along with JUnit Jupiter. So after 255 classes, Cucumber fails discovery as seen in #2930. Fixes #2930.
Cheers. Thanks for reporting this. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
👓 What did you see?
Build of PR opened by renovate with new Cucumber version is failing: jhipster/jhipster-lite#11057:
✅ What did you expect to see?
Build running fine, as it was with 7.19.0
📦 Which tool/library version are you using?
cucumber-junit-platform-engine
cucumber-spring
maven-failsafe-plugin
gradle-develocity
🔬 How could we reproduce it?
No response
📚 Any additional context?
Our cucumbers tests are executed with maven-failsafe-plugin, but here the error happens with the execution of maven-surefire-plugin
The text was updated successfully, but these errors were encountered: