Open bachhavdipak opened 1 year ago
Can you provide a sample project that reproduces the issue?
Do you get this error with version 3.9.7?
Yes but Its resolved after increasing heap space
@wakaleo : no its not fixed ,even after increasing heap space to 4GB with version 3.9.7. As I mentioned earlier functionality is working as expected with 3.7.1 version so not sure what changes are integrated between this two releases.
Error
2023-07-21T11:25:45.7280685Z org.junit.platform.commons.JUnitException: TestEngine with ID 'junit-jupiter' failed to execute tests 2023-07-21T11:25:45.7281158Z at app//org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:153) 2023-07-21T11:25:45.7281626Z at app//org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:127) 2023-07-21T11:25:45.7282041Z at app//org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:90) 2023-07-21T11:25:45.7282489Z at app//org.junit.platform.launcher.core.EngineExecutionOrchestrator.lambda$execute$0(EngineExecutionOrchestrator.java:55) 2023-07-21T11:25:45.7282943Z at app//org.junit.platform.launcher.core.EngineExecutionOrchestrator.withInterceptedStreams(EngineExecutionOrchestrator.java:102) 2023-07-21T11:25:45.7283637Z at app//org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:54) 2023-07-21T11:25:45.7284030Z at app//org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:114) 2023-07-21T11:25:45.7284409Z at app//org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:86) 2023-07-21T11:25:45.7284829Z at app//org.junit.platform.launcher.core.DefaultLauncherSession$DelegatingLauncher.execute(DefaultLauncherSession.java:86) 2023-07-21T11:25:45.7285291Z at app//org.junit.platform.launcher.core.SessionPerRequestLauncher.execute(SessionPerRequestLauncher.java:53) 2023-07-21T11:25:45.7285984Z at org.gradle.api.internal.tasks.testing.junitplatform.JUnitPlatformTestClassProcessor$CollectAllTestClassesExecutor.processAllTestClasses(JUnitPlatformTestClassProcessor.java:99) 2023-07-21T11:25:45.7286654Z at org.gradle.api.internal.tasks.testing.junitplatform.JUnitPlatformTestClassProcessor$CollectAllTestClassesExecutor.access$000(JUnitPlatformTestClassProcessor.java:79) 2023-07-21T11:25:45.7287123Z at org.gradle.api.internal.tasks.testing.junitplatform.JUnitPlatformTestClassProcessor.stop(JUnitPlatformTestClassProcessor.java:75) 2023-07-21T11:25:45.7287504Z at org.gradle.api.internal.tasks.testing.SuiteTestClassProcessor.stop(SuiteTestClassProcessor.java:62) 2023-07-21T11:25:45.7287814Z at java.base@17.0.7/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 2023-07-21T11:25:45.7288133Z at java.base@17.0.7/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) 2023-07-21T11:25:45.7288547Z at java.base@17.0.7/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 2023-07-21T11:25:45.7288935Z at java.base@17.0.7/java.lang.reflect.Method.invoke(Method.java:568) 2023-07-21T11:25:45.7289322Z at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:36) 2023-07-21T11:25:45.7289725Z at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24) 2023-07-21T11:25:45.7290164Z at org.gradle.internal.dispatch.ContextClassLoaderDispatch.dispatch(ContextClassLoaderDispatch.java:33) 2023-07-21T11:25:45.7290647Z at org.gradle.internal.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:94) 2023-07-21T11:25:45.7291039Z at jdk.proxy1/jdk.proxy1.$Proxy2.stop(Unknown Source) 2023-07-21T11:25:45.7291382Z at org.gradle.api.internal.tasks.testing.worker.TestWorker$3.run(TestWorker.java:193) 2023-07-21T11:25:45.7291821Z at org.gradle.api.internal.tasks.testing.worker.TestWorker.executeAndMaintainThreadName(TestWorker.java:129) 2023-07-21T11:25:45.7292259Z at org.gradle.api.internal.tasks.testing.worker.TestWorker.execute(TestWorker.java:100) 2023-07-21T11:25:45.7292674Z at org.gradle.api.internal.tasks.testing.worker.TestWorker.execute(TestWorker.java:60) 2023-07-21T11:25:45.7293116Z at org.gradle.process.internal.worker.child.ActionExecutionWorker.execute(ActionExecutionWorker.java:56) 2023-07-21T11:25:45.7293603Z at org.gradle.process.internal.worker.child.SystemApplicationClassLoaderWorker.call(SystemApplicationClassLoaderWorker.java:113) 2023-07-21T11:25:45.7294129Z at org.gradle.process.internal.worker.child.SystemApplicationClassLoaderWorker.call(SystemApplicationClassLoaderWorker.java:65) 2023-07-21T11:25:45.7294605Z at app//worker.org.gradle.process.internal.worker.GradleWorkerMain.run(GradleWorkerMain.java:69) 2023-07-21T11:25:45.7295015Z at app//worker.org.gradle.process.internal.worker.GradleWorkerMain.main(GradleWorkerMain.java:74) 2023-07-21T11:25:45.7295196Z 2023-07-21T11:25:45.7295354Z Caused by: 2023-07-21T11:25:45.7295990Z org.junit.platform.commons.JUnitException: Error executing tests for engine junit-jupiter 2023-07-21T11:25:45.7296372Z at app//org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:57) 2023-07-21T11:25:45.7296801Z at app//org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:147) 2023-07-21T11:25:45.7297079Z ... 31 more 2023-07-21T11:25:45.7297147Z 2023-07-21T11:25:45.7297296Z Caused by: 2023-07-21T11:25:45.7297537Z java.util.concurrent.ExecutionException: java.lang.OutOfMemoryError 2023-07-21T11:25:45.7297888Z at java.base/java.util.concurrent.ForkJoinTask.reportExecutionException(ForkJoinTask.java:605) 2023-07-21T11:25:45.7298413Z at java.base/java.util.concurrent.ForkJoinTask.get(ForkJoinTask.java:981) 2023-07-21T11:25:45.7298837Z at org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:54) 2023-07-21T11:25:45.7299181Z ... 32 more 2023-07-21T11:25:45.7299266Z 2023-07-21T11:25:45.7299435Z Caused by: 2023-07-21T11:25:45.7299650Z java.lang.OutOfMemoryError 2023-07-21T11:25:45.7299943Z at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) 2023-07-21T11:25:45.7300368Z at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:77) 2023-07-21T11:25:45.7300857Z at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) 2023-07-21T11:25:45.7301311Z at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499) 2023-07-21T11:25:45.7301700Z at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:480) 2023-07-21T11:25:45.7302101Z at java.base/java.util.concurrent.ForkJoinTask.getThrowableException(ForkJoinTask.java:564) 2023-07-21T11:25:45.7302528Z at java.base/java.util.concurrent.ForkJoinTask.reportExecutionException(ForkJoinTask.java:604) 2023-07-21T11:25:45.7302834Z ... 34 more 2023-07-21T11:25:45.7302916Z 2023-07-21T11:25:45.7303090Z Caused by: 2023-07-21T11:25:45.7303322Z java.lang.OutOfMemoryError: Java heap space 2023-07-21T11:25:45.8259250Z 2023-07-21T11:25:45.8259806Z UnknownClass.JUnit Jupiter FAILED
I can't reproduce it (I have a test project with 87000 tests which runs with 1m of heapspace) - can you provide a sample project to reproduce the issue, or investigate the code on your side and raise a PR?
I cant provide you project and its really difficult to debug code as well becuase issue is occuring while executing jobs in a parallel environment. Cant we just check above stracktrace and compare it with the latest release to fix above issue.
The latest release is a complete rewrite of the reporting engine, so that might be tricky, but you can certainly checkout different versions locally to see if you can isolate the issue.
If I am not wrong then its exactly same issue https://github.com/serenity-bdd/serenity-core/issues/3093. Which is somehow working with 3.7.1 release
So maybe start looking at the commits after that release. If you need someone to investigate in depth more quickly, it could be done as part of a commercial support contract.
Is it possible to create another relase 3.7.X with console logging enabled ?
No, but you can check out that version in git, make the changes you want, and build with mvn clean install -DskipTests
But I am unable to use those changes out of serenity core project until and unless its publish with the maven
The command above will deploy a snapshot version to your local maven repository.
@bachhavdipak , can you provide a heap dump?
I am facing below OutOfMemoryError issue with the latest serenity 3.9.0 version while running my code same code is working with serenity 3.7.1 version without any issue.
I have tried to increase heap space. Also tried to update junit-platform.properties but nothing is working.