Did you check docs and existing issues?
- I have read all the plugin docs
- I have searched the existing issues
- I have searched the existing issues of plugins related to this issue
Neovim version (nvim -v)
NVIM v0.10.2 Build type: Release LuaJIT 2.1.1713773202
Operating system/version
RHEL 8.10
Describe the bug
I have been seeing some compilation errors with the Eclipse Test Runner
at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:57) ~[junit-platform-engine-1.8.2.jar:1.8.2]
at org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:54) ~[junit-platform-engine-1.8.2.jar:1.8.2]
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:147) ~[.cp/:na]
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:127) ~[.cp/:na]
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:90) ~[.cp/:na]
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.lambda$execute$0(EngineExecutionOrchestrator.java:55) ~[.cp/:na]
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.withInterceptedStreams(EngineExecutionOrchestrator.java:102) ~[.cp/:na]
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:54) ~[.cp/:na]
at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:114) ~[.cp/:na]
at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:95) ~[.cp/:na]
at org.junit.platform.launcher.core.DefaultLauncherSession$DelegatingLauncher.execute(DefaultLauncherSession.java:91) ~[.cp/:na]
at org.junit.platform.launcher.core.SessionPerRequestLauncher.execute(SessionPerRequestLauncher.java:60) ~[.cp/:na]
at org.eclipse.jdt.internal.junit5.runner.JUnit5TestReference.run(JUnit5TestReference.java:98) ~[.cp/:na]
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:40) ~[.cp/:na]
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:529) ~[.cp/:na]
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:757) ~[.cp/:na]
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:452) ~[.cp/:na]
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:210) ~[.cp/:na]
....
Bean instantiation via constructor failed; nested exception is org.springframework.beans.Be
anInstantiationException: Failed to instantiate [xxx.xxx <Redacted>]: Constructor threw exception; nested exception is java.lang.Error: Unresolved compilation problems:
Cannot infer type argument(s) for <R, A> collect(Collector<? super T,A,R>)
The method getFirst() is undefined for the type Object
The method getFirst() is undefined for the type Object
The operator > is undefined for the argument type(s) java.lang.Object, java.lang.Object
The method getSecond() is undefined for the type Object
The method getSecond() is undefined for the type Object
at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:800) ~[spring-beans-5.3.22.jar:5.3.22]
at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:229) ~[spring-beans-5.3.22.jar:5.3.22]
The test seems to work fine when running using gradle
From: https://docs.gradle.org/current/userguide/java_testing.html#whitebox_unit_test_execution_on_the_classpath
If you are using Eclipse: By default, Eclipse also runs unit tests as modules using module patching (see [below](https://docs.gradle.org/current/userguide/java_testing.html#sec:java_testing_modular_patching)). In an imported Gradle project, unit testing a module with the Eclipse test runner might fail. You then need to manually adjust the classpath/module path in the test run configuration or delegate test execution to Gradle.
Is there a way to configure this to delegate to gradle here,
Something that might be helpful: microsoft/vscode-java-debug#1127
Steps To Reproduce
Will try to add an example to reproduce the error.
Expected Behavior
Test should run