Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Maven forkCount and reuseForks apparently not respected

Đang mở
#1,654 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
25/100
Loại issue
Lỗi
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Đình trệ
Công nghệ
java, vscode
Lĩnh vực
devtools, testing-qa

Hướng nghiên cứu

Tái hiện hành vi bằng pom.xml của module, các thiết lập của maven-surefire-plugin và VS Code test runner, đồng thời so sánh việc thực thi Maven qua CLI với việc thực thi qua VS Code. Theo dõi xem VS Code runner có ủy quyền cho Maven hay không và xử lý forkCount, reuseForks cũng như việc loại trừ test như thế nào. Công việc được xem là hoàn tất khi hành vi được hỗ trợ hoặc giới hạn đã được xác lập, đồng thời cấu hình hoặc workaround được yêu cầu đã được ghi lại một cách rõ ràng.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

ai-triaged enhancement maven question test-execution

Hello,

I am using systemstubs library.

As its author said, because of the way the library works, tests using it must be running in a forked vm, one per test.

I have been able to make this work in maven.

I have a multi module pom.xml. In my specific module pom.xml I configured sure-fire as follows:

<plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>3.2.5</version>

                <configuration>
                    <forkCount>2.5C</forkCount>
                    <reuseForks>false</reuseForks>
                </configuration>

            </plugin>

This makes tests run by maven in cli run correctly.

However, when I run tests in vs code, they behave exactly as like they did when maven had not been configured with 1 fork, not reusing forks.

it seems as if not only is vs code not forking vms, it is running even methods in paralel, because tests in the same class are conflicting, while they should run sequentially in one thread, one after the other, in a class exclusive jvm process as maven is doing.

This makes me believe that either

  • vscode has its own runner and does not delegate to maven the test running OR
  • Some how delegation is ignoring the specific configuration in the module's pom.xml.

I have been searching a way to let vscode test runner know tthat either it should fork jvm process and run one test in each vm or it should delegate and follow what is specified in pom.xml.

Another desired and may be faster solution is to find (something I haven't found either) a way of asking vscode to just ignore these tests when running tests, so that we stop having failures on the test result.

Can you please provide me with information on how to proceed?

Ngôn ngữ chính
TypeScript
Star
339
Fork
174
Merge trung bình
1 ngày 4 giờ
Pull request đã merge (30 ngày)
15

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của microsoft/vscode-java-test

Tất cả issue của microsoft/vscode-java-test

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.