microsoft / microsoft/vscode-java-test
Cannot run test class with '$' in its name sometime.
Open
Nobody has claimed this yet.
ai-triaged
bug
junit
low-priority
needs-reproduction
test-discovery
upstream
- Dominant language
- TypeScript
- Stars
- 340
- Forks
- 173
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 18
Description
Looks like the upstream test runner could not deal with this case decently.
I can see traces:
org.eclipse.core.runtime.CoreException: No tests found with test runner 'JUnit 4'.
at org.eclipse.jdt.junit.launcher.JUnitLaunchConfigurationDelegate.abort(JUnitLaunchConfigurationDelegate.java:763)
at org.eclipse.jdt.junit.launcher.JUnitLaunchConfigurationDelegate.evaluateTests(JUnitLaunchConfigurationDelegate.java:372)
at org.eclipse.jdt.junit.launcher.JUnitLaunchConfigurationDelegate.getVMRunnerConfiguration(JUnitLaunchConfigurationDelegate.java:162)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)
at com.microsoft.java.test.plugin.launchers.JUnitLaunchConfigurationDelegate.getJUnitLaunchArguments(JUnitLaunchConfigurationDelegate.java:75)
at com.microsoft.java.test.plugin.launchers.JUnitLaunchUtils.resolveLaunchArgument(JUnitLaunchUtils.java:102)
at com.microsoft.java.test.plugin.handler.TestDelegateCommandHandler.executeCommand(TestDelegateCommandHandler.java:50)
at org.eclipse.jdt.ls.core.internal.handlers.WorkspaceExecuteCommandHandler$1.run(WorkspaceExecuteCommandHandler.java:215)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)
at org.eclipse.jdt.ls.core.internal.handlers.WorkspaceExecuteCommandHandler.executeCommand(WorkspaceExecuteCommandHandler.java:205)
at org.eclipse.jdt.ls.core.internal.handlers.JDTLanguageServer.lambda$4(JDTLanguageServer.java:507)
at org.eclipse.jdt.ls.core.internal.BaseJDTLanguageServer.lambda$0(BaseJDTLanguageServer.java:75)
at java.base/java.util.concurrent.CompletableFuture$UniApply.tryFire(Unknown Source)
at java.base/java.util.concurrent.CompletableFuture$Completion.exec(Unknown Source)
at java.base/java.util.concurrent.ForkJoinTask.doExec(Unknown Source)
at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(Unknown Source)
at java.base/java.util.concurrent.ForkJoinPool.scan(Unknown Source)
at java.base/java.util.concurrent.ForkJoinPool.runWorker(Unknown Source)
at java.base/java.util.concurrent.ForkJoinWorkerThread.run(Unknown Source)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the JUnit launch path named in the stack trace, especially JUnitLaunchConfigurationDelegate, JUnitLaunchUtils, and TestDelegateCommandHandler. Reproduce the failure with a test class whose name contains '$' and compare it with a class using an ordinary name. Done means the affected test class can be run through the VS Code Java test runner without the reported 'No tests found' error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, typescript
- Domain
- testing
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 28/100