mirror of
https://github.com/l0ng-ai/openidea.git
synced 2026-11-24 16:04:21 +00:00
fix(run): let Maven reactor modules without the selected tests pass in every test run (#4845)
In a Maven multi-module project, Rerun Failed Tests and Run on a test file failed before the selected tests ran: -Dtest reached the first module without a matching test and Surefire stopped the build, skipping the module with the test. Those two paths built -Dtest themselves without -Dsurefire.failIfNoSpecifiedTests=false; every Maven test selection now goes through withMavenTests, which replaces an earlier -Dtest and always adds the flag. Co-authored-by: ntbang0901 <121003585+ntbang0901@users.noreply.github.com> Co-authored-by: ntbang0901 <121003585+ntbang0901@users.noreply.github.com>
This commit is contained in:
@@ -261,7 +261,12 @@ describe("application configurations", () => {
|
||||
});
|
||||
|
||||
it("scopes Maven and Gradle test configs to a class or method", () => {
|
||||
const file = cfg({ id: "f", kind: "maven", args: ["test", "-Dtest=OrderTest"], isTest: true });
|
||||
const file = cfg({
|
||||
id: "f",
|
||||
kind: "maven",
|
||||
args: ["test", "-Dtest=OrderTest", "-Dsurefire.failIfNoSpecifiedTests=false"],
|
||||
isTest: true,
|
||||
});
|
||||
expect(jvmTestConfig(file, "a.OrderTest$Nested", "fails")).toMatchObject({
|
||||
name: "Nested.fails",
|
||||
args: ["test", "-Dtest=a.OrderTest$Nested#fails", "-Dsurefire.failIfNoSpecifiedTests=false"],
|
||||
|
||||
Reference in New Issue
Block a user