microsoft / microsoft/vscode-java-test
@DisabledForJreRange and @EnabledForJreRange using source target rather what java version being used
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 340
- Forks
- 173
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 18
Description
I have tests with:
@DisabledForJreRange(min = JRE.JAVA_8, max = JRE.JAVA_8, disabledReason = "JSH is not supported on Java 8")
and even though I'm running with Java 17 all tests are ignored in vscode but run when running with gradle.
Only way I can get them to be included is to change:
sourceCompatibility = '8'
targetCompatibility = '8'
to
sourceCompatibility = '17'
targetCompatibility = '17'
but it is not consistent.
In any case vscode-java testrunner auto ignore tests that shouldn't be ignored compared to gradle command line.
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
Reproduce the annotation example in VS Code with Java 17 while sourceCompatibility and targetCompatibility remain 8, then compare the VS Code Java test runner result with Gradle. Trace how the runner determines the Java version for @DisabledForJreRange and @EnabledForJreRange; done means tests are skipped or included based on the runtime JRE rather than the source or target setting.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, typescript, vscode
- Domain
- devtools, testing-qa
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100