Remove TestGroup.PERFORMANCE
Now that there's a new JMH infrastructure for benchmarks and that performance tests have been rewritten to use it, we should remove the `PERFORMANCE` `TestGroup` to avoid introducing such tests in the future. Closes gh-24830
This commit is contained in:
@@ -50,21 +50,21 @@ class TestGroupParsingTests {
|
||||
|
||||
@Test
|
||||
void parseWithSpaces() {
|
||||
assertThat(TestGroup.parse(" PERFORMANCE, PERFORMANCE ")).containsOnly(TestGroup.PERFORMANCE);
|
||||
assertThat(TestGroup.parse(" LONG_RUNNING, LONG_RUNNING ")).containsOnly(TestGroup.LONG_RUNNING);
|
||||
}
|
||||
|
||||
@Test
|
||||
void parseInMixedCase() {
|
||||
assertThat(TestGroup.parse("performance, PERFormaNCE")).containsOnly(TestGroup.PERFORMANCE);
|
||||
assertThat(TestGroup.parse("long_running, LonG_RunnING")).containsOnly(TestGroup.LONG_RUNNING);
|
||||
}
|
||||
|
||||
@Test
|
||||
void parseMissing() {
|
||||
assertThatIllegalArgumentException()
|
||||
.isThrownBy(() -> TestGroup.parse("performance, missing"))
|
||||
.isThrownBy(() -> TestGroup.parse("long_running, missing"))
|
||||
.withMessageContaining("Unable to find test group 'missing' when parsing " +
|
||||
"testGroups value: 'performance, missing'. Available groups include: " +
|
||||
"[LONG_RUNNING,PERFORMANCE]");
|
||||
"testGroups value: 'long_running, missing'. Available groups include: " +
|
||||
"[LONG_RUNNING]");
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -73,10 +73,10 @@ class TestGroupParsingTests {
|
||||
}
|
||||
|
||||
@Test
|
||||
void parseAllExceptPerformance() {
|
||||
void parseAllExceptLongRunning() {
|
||||
Set<TestGroup> expected = EnumSet.allOf(TestGroup.class);
|
||||
expected.remove(TestGroup.PERFORMANCE);
|
||||
assertThat(TestGroup.parse("all-performance")).isEqualTo(expected);
|
||||
expected.remove(TestGroup.LONG_RUNNING);
|
||||
assertThat(TestGroup.parse("all-long_running")).isEqualTo(expected);
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -85,7 +85,7 @@ class TestGroupParsingTests {
|
||||
.isThrownBy(() -> TestGroup.parse("all-missing"))
|
||||
.withMessageContaining("Unable to find test group 'missing' when parsing " +
|
||||
"testGroups value: 'all-missing'. Available groups include: " +
|
||||
"[LONG_RUNNING,PERFORMANCE]");
|
||||
"[LONG_RUNNING]");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -30,7 +30,6 @@ import static org.assertj.core.api.Assertions.assertThatExceptionOfType;
|
||||
import static org.assertj.core.api.Assertions.assertThatIllegalStateException;
|
||||
import static org.junit.jupiter.api.Assumptions.assumeTrue;
|
||||
import static org.springframework.core.testfixture.TestGroup.LONG_RUNNING;
|
||||
import static org.springframework.core.testfixture.TestGroup.PERFORMANCE;
|
||||
|
||||
/**
|
||||
* Tests for {@link TestGroup}.
|
||||
@@ -68,12 +67,6 @@ class TestGroupTests {
|
||||
assertThatExceptionOfType(TestAbortedException.class).isThrownBy(() -> assumeGroup(LONG_RUNNING));
|
||||
}
|
||||
|
||||
@Test
|
||||
void assumeGroupWithNoMatchingActiveTestGroup() {
|
||||
setTestGroups(PERFORMANCE);
|
||||
assertThatExceptionOfType(TestAbortedException.class).isThrownBy(() -> assumeGroup(LONG_RUNNING));
|
||||
}
|
||||
|
||||
@Test
|
||||
void assumeGroupWithMatchingActiveTestGroup() {
|
||||
setTestGroups(LONG_RUNNING);
|
||||
@@ -107,7 +100,7 @@ class TestGroupTests {
|
||||
.isInstanceOf(IllegalArgumentException.class)
|
||||
.withMessage(
|
||||
"Unable to find test group 'bogus' when parsing testGroups value: '" + testGroups +
|
||||
"'. Available groups include: [LONG_RUNNING,PERFORMANCE]");
|
||||
"'. Available groups include: [LONG_RUNNING]");
|
||||
}
|
||||
|
||||
private void setTestGroups(TestGroup... testGroups) {
|
||||
|
||||
Reference in New Issue
Block a user