@DisabledForJreRange and @EnabledForJreRange using source target rather what java version being used

未关闭
#1,758 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
45/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
停滞
技术栈
java, typescript, vscode

调研方向

在 sourceCompatibility 和 targetCompatibility 保持为 8 的情况下,使用 Java 17 在 VS Code 中复现注解示例,然后将 VS Code Java 测试运行器的结果与 Gradle 进行比较。跟踪运行器如何为 @DisabledForJreRange 和 @EnabledForJreRange 确定 Java 版本;完成标准是测试根据运行时 JRE 而不是 source 或 target 设置被跳过或包含。

由索引模型根据 Issue 内容生成。

描述

ai-triaged bug gradle junit test-execution

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.

主要语言
TypeScript
星标
340
派生
173
平均合并
1 天 19 小时
30 天内合并 PR
18

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

microsoft/vscode-java-test 的其他 Issue

查看 microsoft/vscode-java-test 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。