Skip to content

Commit b4a13dd

Browse files
committed
Fix JUnit Jupiter discovery issues on 6.2.x
1 parent 661dca5 commit b4a13dd

File tree

2 files changed

+1
-33
lines changed

2 files changed

+1
-33
lines changed

spring-test/src/test/java/org/springframework/test/context/jdbc/AfterTestClassSqlScriptsTests.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ void databaseIsNotWipedBetweenTests() {
7272
}
7373

7474
@Nested
75+
@TestMethodOrder(OrderAnnotation.class)
7576
@Sql(scripts = "recreate-schema.sql", executionPhase = BEFORE_TEST_CLASS)
7677
@Sql(scripts = "drop-schema.sql", executionPhase = AFTER_TEST_CLASS)
7778
class NestedAfterTestClassSqlScriptsTests {

spring-test/src/test/java/org/springframework/test/context/junit/jupiter/AutowiredConfigurationErrorsIntegrationTests.java

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -65,11 +65,9 @@ class AutowiredConfigurationErrorsIntegrationTests {
6565
@ParameterizedTest
6666
@ValueSource(classes = {
6767
StaticAutowiredBeforeAllMethod.class,
68-
StaticAutowiredPrivateBeforeAllMethod.class,
6968
StaticAutowiredAfterAllMethod.class,
7069
AutowiredBeforeEachMethod.class,
7170
AutowiredAfterEachMethod.class,
72-
AutowiredPrivateAfterEachMethod.class,
7371
AutowiredTestMethod.class,
7472
AutowiredRepeatedTestMethod.class,
7573
AutowiredParameterizedTestMethod.class
@@ -168,21 +166,6 @@ void test() {
168166
}
169167
}
170168

171-
@SpringJUnitConfig(Config.class)
172-
@FailingTestCase
173-
static class StaticAutowiredPrivateBeforeAllMethod {
174-
175-
@Autowired
176-
@BeforeAll
177-
private static void beforeAll(TestInfo testInfo) {
178-
}
179-
180-
@Test
181-
@DisplayName(DISPLAY_NAME)
182-
void test() {
183-
}
184-
}
185-
186169
@SpringJUnitConfig(Config.class)
187170
@TestInstance(PER_CLASS)
188171
@FailingTestCase
@@ -260,22 +243,6 @@ void afterEach(TestInfo testInfo) {
260243
}
261244
}
262245

263-
@SpringJUnitConfig(Config.class)
264-
@FailingTestCase
265-
static class AutowiredPrivateAfterEachMethod {
266-
267-
@Test
268-
@DisplayName(DISPLAY_NAME)
269-
void test() {
270-
}
271-
272-
@Autowired
273-
@AfterEach
274-
private void afterEach(TestInfo testInfo) {
275-
}
276-
}
277-
278-
279246
@SpringJUnitConfig(Config.class)
280247
@FailingTestCase
281248
static class AutowiredTestMethod {

0 commit comments

Comments
 (0)