redhat-developer / redhat-developer/vscode-java

Auto build will delete test resources in UT

未关闭
#3,517 2 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

主要语言
TypeScript
星标
2.3k
派生
547
平均合并
20 小时 1 分钟
30 天内合并 PR
11

描述

[provide a description of the issue]

Environment
  • Operating System:Windows11
  • JDK version:17
  • Visual Studio Code version:1.87.0
  • Java extension version:v1.28.1
Steps To Reproduce
  1. have a maven project like this
    src/main/java
    a.java
    src/main/resources
    test.json
    src/test/java
    aTest.java
    src/test/resources
    test.csv
  2. After run Java: Rebuild Project, I found that test.csv is copied to the target, but deteled in a while.
    So I run test in the aTest.java, I got a message that test.csv is not found.
  3. If I turn off auto build, success.

Is it possible that auto build cleaned the resources?

pom.xml

<resources>
	<resource>
		<directory>src/main/resources</directory>
		<filtering>true</filtering>
	</resource>
</resources>
<plugins>
	<plugin>
		<artifactId>maven-resources-plugin</artifactId>
		<executions>
			<execution>
				<phase>process-resources</phase>
				<goals>
					<goal>resources</goal>
				</goals>
			</execution>
		</executions>
	</plugin>

贡献指南

打开贡献指南

从这里开始

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

调研方向

从 pom.xml 中的 Maven 配置开始,并使用 Java 重现该问题:启用自动构建后执行 Rebuild Project。将 src/test/resources/test.csv 与目标输出进行比较,并运行 aTest.java;完成意味着测试资源在重新构建后仍然可用,并且测试成功。

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

评估

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

把新 issue 发到你的邮箱

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