Skip to content

Commit d957d01

Browse files
committed
Polishing
1 parent c4c005b commit d957d01

File tree

2 files changed

+7
-12
lines changed

2 files changed

+7
-12
lines changed

spring-test/src/test/java/org/springframework/test/context/aot/AotIntegrationTests.java

+6-11
Original file line numberDiff line numberDiff line change
@@ -155,18 +155,13 @@ void endToEndTestsForEntireSpringTestModule() {
155155
runEndToEndTests(testClasses, false);
156156
}
157157

158-
@Disabled("Comment out to run @TestBean integration tests in AOT mode")
158+
@Disabled("Comment out to run Bean Override integration tests in AOT mode")
159159
@Test
160-
void endToEndTestsForTestBeanOverrideTestClasses() {
161-
List<Class<?>> testClasses = List.of(
162-
org.springframework.test.context.aot.samples.bean.override.convention.TestBeanJupiterTests.class,
163-
org.springframework.test.context.bean.override.convention.TestBeanForByNameLookupIntegrationTests.class,
164-
org.springframework.test.context.bean.override.convention.TestBeanForByNameLookupIntegrationTests.TestBeanFieldInEnclosingClassTests.class,
165-
org.springframework.test.context.bean.override.convention.TestBeanForByNameLookupIntegrationTests.TestBeanFieldInEnclosingClassTests.TestBeanFieldInEnclosingClassLevel2Tests.class,
166-
org.springframework.test.context.bean.override.convention.TestBeanForByNameLookupIntegrationTests.TestBeanFactoryMethodInEnclosingClassTests.class,
167-
org.springframework.test.context.bean.override.convention.TestBeanForByNameLookupIntegrationTests.TestBeanFactoryMethodInEnclosingClassTests.TestBeanFactoryMethodInEnclosingClassLevel2Tests.class
168-
);
169-
160+
void endToEndTestsForBeanOverrides() {
161+
List<Class<?>> testClasses = createTestClassScanner()
162+
.scan("org.springframework.test.context.bean.override")
163+
.filter(clazz -> clazz.getSimpleName().endsWith("Tests"))
164+
.toList();
170165
runEndToEndTests(testClasses, true);
171166
}
172167

spring-test/src/test/java/org/springframework/test/context/bean/override/convention/TestBeanForByTypeLookupIntegrationTests.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ StringBuilder beanString3() {
129129
}
130130

131131
@FunctionalInterface
132-
interface MessageService {
132+
public interface MessageService {
133133

134134
String getMessage();
135135
}

0 commit comments

Comments
 (0)