Skip to content

Commit 93a06c4

Browse files
Remove redundant ITs and resource cleanups (#3319)
When we have one provider test with empty, the same profiles are redundant remove unused ITs resources
1 parent b2d4904 commit 93a06c4

74 files changed

Lines changed: 4 additions & 2657 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

surefire-its/src/test/java/org/apache/maven/surefire/its/CheckTestFailIfNoTestsIT.java

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -49,13 +49,4 @@ public void dontFailIfNoTests() {
4949
TestFile reportsDir = outputValidator.getSurefireReportsFile("");
5050
assertFalse(reportsDir.exists(), "Unexpected reports directory");
5151
}
52-
53-
@Test
54-
public void jUnit48CategoriesFailWhenNoTests() {
55-
unpack().failIfNoTests(false)
56-
.activateProfile("junit47")
57-
.setJUnitVersion("4.12")
58-
.executeTest()
59-
.verifyErrorFreeLog();
60-
}
6152
}

surefire-its/src/test/java/org/apache/maven/surefire/its/TestMultipleMethodsIT.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,4 @@ public OutputValidator multipleMethod(String projectName, String... goals) {
4646
public void testJunit44() {
4747
multipleMethod("junit44-multiple-methods");
4848
}
49-
50-
@Test
51-
public void testJunit5() {
52-
multipleMethod("junit44-multiple-methods");
53-
}
5449
}

surefire-its/src/test/java/org/apache/maven/surefire/its/TestSingleMethodIT.java

Lines changed: 2 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -51,20 +51,9 @@ public OutputValidator singleMethod(
5151
return launcher.executeTest().verifyErrorFreeLog().assertTestSuiteResults(1, 0, 0, 0);
5252
}
5353

54-
@Test
55-
public void testJunit44() {
56-
singleMethod("junit44-single-method", Collections.emptyMap(), null);
57-
}
58-
59-
@Test
60-
public void testJunit48Provider4() {
61-
singleMethod("junit48-single-method", Collections.emptyMap(), null, "-P surefire-junit4");
62-
}
63-
6454
@Test
6555
public void testJunit48Provider47() {
66-
singleMethod("junit48-single-method", Collections.emptyMap(), null, "-P surefire-junit47")
67-
.verifyTextInLog(RUNNING_WITH_PROVIDER47);
56+
singleMethod("junit48-single-method", Collections.emptyMap(), null).verifyTextInLog(RUNNING_WITH_PROVIDER47);
6857
}
6958

7059
@Test
@@ -91,20 +80,7 @@ public void testTestNg5149() {
9180

9281
@Test
9382
public void fullyQualifiedJunit48Provider4() {
94-
singleMethod(
95-
"junit48-single-method",
96-
Collections.emptyMap(),
97-
"junit4.BasicTest#testSuccessOne",
98-
"-P surefire-junit4");
99-
}
100-
101-
@Test
102-
public void fullyQualifiedJunit48Provider47() {
103-
singleMethod(
104-
"junit48-single-method",
105-
Collections.emptyMap(),
106-
"junit4.BasicTest#testSuccessOne",
107-
"-P surefire-junit47");
83+
singleMethod("junit48-single-method", Collections.emptyMap(), "junit4.BasicTest#testSuccessOne");
10884
}
10985

11086
@Test

surefire-its/src/test/java/org/apache/maven/surefire/its/jiras/Surefire1209RerunAndForkCountIT.java

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -35,37 +35,20 @@ public class Surefire1209RerunAndForkCountIT extends SurefireJUnit4IntegrationTe
3535
private static final String SUMMARY_COUNTS = "Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Flakes: 2";
3636

3737
@Test
38-
public void reusableForksJUnit47() throws VerificationException {
38+
public void reusableForksJUnit() throws VerificationException {
3939
unpack().executeTest()
4040
.assertTestSuiteResults(5, 0, 0, 0, 4)
4141
.assertThatLogLine(containsString(SUMMARY_COUNTS), is(1));
4242
}
4343

4444
@Test
45-
public void notReusableForksJUnit47() throws VerificationException {
45+
public void notReusableForksJUnit() throws VerificationException {
4646
unpack().reuseForks(false)
4747
.executeTest()
4848
.assertTestSuiteResults(5, 0, 0, 0, 4)
4949
.assertThatLogLine(containsString(SUMMARY_COUNTS), is(1));
5050
}
5151

52-
@Test
53-
public void reusableForksJUnit4() throws VerificationException {
54-
unpack().activateProfile("junit4")
55-
.executeTest()
56-
.assertTestSuiteResults(5, 0, 0, 0, 4)
57-
.assertThatLogLine(containsString(SUMMARY_COUNTS), is(1));
58-
}
59-
60-
@Test
61-
public void notReusableForksJUnit4() throws VerificationException {
62-
unpack().activateProfile("junit4")
63-
.reuseForks(false)
64-
.executeTest()
65-
.assertTestSuiteResults(5, 0, 0, 0, 4)
66-
.assertThatLogLine(containsString(SUMMARY_COUNTS), is(1));
67-
}
68-
6952
private SurefireLauncher unpack() {
7053
return unpack("surefire-1209-rerun-and-forkcount");
7154
}

surefire-its/src/test/resources/SurefireToolchains/pom.xml

Lines changed: 0 additions & 72 deletions
This file was deleted.

surefire-its/src/test/resources/SurefireToolchains/src/main/java/test/surefiretoolchains/App.java

Lines changed: 0 additions & 29 deletions
This file was deleted.

surefire-its/src/test/resources/SurefireToolchains/src/test/java/test/surefiretoolchains/AppTest.java

Lines changed: 0 additions & 17 deletions
This file was deleted.

surefire-its/src/test/resources/ant-ignore/.gitignore

Lines changed: 0 additions & 3 deletions
This file was deleted.

surefire-its/src/test/resources/ant-ignore/build.xml

Lines changed: 0 additions & 52 deletions
This file was deleted.

surefire-its/src/test/resources/ant-ignore/ivy.xml

Lines changed: 0 additions & 6 deletions
This file was deleted.

0 commit comments

Comments
 (0)