Skip to content

Commit 77afe76

Browse files
mdeinumsnicoll
authored andcommitted
Polish
The SpringBootContextLoader still checked if tests were annotated with @IntegrationTEST or @WebIntegrationTest. Those classes have been removed in Spring Boot 1.5 and been deprecated since 1.4. This commit removes the check on the annotations as well as the static list of names. See gh-14592
1 parent 579722b commit 77afe76

File tree

1 file changed

+0
-14
lines changed

1 file changed

+0
-14
lines changed

spring-boot-project/spring-boot-test/src/main/java/org/springframework/boot/test/context/SpringBootContextLoader.java

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -80,15 +80,6 @@
8080
*/
8181
public class SpringBootContextLoader extends AbstractContextLoader {
8282

83-
private static final Set<String> INTEGRATION_TEST_ANNOTATIONS;
84-
85-
static {
86-
Set<String> annotations = new LinkedHashSet<>();
87-
annotations.add("org.springframework.boot.test.IntegrationTest");
88-
annotations.add("org.springframework.boot.test.WebIntegrationTest");
89-
INTEGRATION_TEST_ANNOTATIONS = Collections.unmodifiableSet(annotations);
90-
}
91-
9283
@Override
9384
public ApplicationContext loadContext(MergedContextConfiguration config)
9485
throws Exception {
@@ -222,11 +213,6 @@ protected List<ApplicationContextInitializer<?>> getInitializers(
222213
}
223214

224215
private boolean isEmbeddedWebEnvironment(MergedContextConfiguration config) {
225-
for (String annotation : INTEGRATION_TEST_ANNOTATIONS) {
226-
if (AnnotatedElementUtils.isAnnotated(config.getTestClass(), annotation)) {
227-
return true;
228-
}
229-
}
230216
SpringBootTest annotation = AnnotatedElementUtils
231217
.findMergedAnnotation(config.getTestClass(), SpringBootTest.class);
232218
if (annotation != null && annotation.webEnvironment().isEmbedded()) {

0 commit comments

Comments
 (0)