Skip to content

Commit 47006ee

Browse files
committed
Fixed side effect on other tests
Issue: SPR-10459
1 parent c1d1495 commit 47006ee

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

spring-context/src/test/java/org/springframework/context/annotation/ComponentScanAnnotationIntegrationTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,8 +159,8 @@ public void withScopeResolver() {
159159
@Test
160160
public void withCustomTypeFilter() {
161161
AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext(ComponentScanWithCustomTypeFilter.class);
162-
assertFalse(ctx.getDefaultListableBeanFactory().containsSingleton("kustomBean"));
163-
KustomAnnotationAutowiredBean testBean = ctx.getBean("kustomBean", KustomAnnotationAutowiredBean.class);
162+
assertFalse(ctx.getDefaultListableBeanFactory().containsSingleton("componentScanParserTests.KustomAnnotationAutowiredBean"));
163+
KustomAnnotationAutowiredBean testBean = ctx.getBean("componentScanParserTests.KustomAnnotationAutowiredBean", KustomAnnotationAutowiredBean.class);
164164
assertThat(testBean.getDependency(), notNullValue());
165165
}
166166

spring-context/src/test/java/org/springframework/context/annotation/ComponentScanParserTests.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,6 @@ public void componentScanRespectsProfileAnnotation() {
135135
* Intentionally spelling "custom" with a "k" since there are numerous
136136
* classes in this package named *Custom*.
137137
*/
138-
@Component("kustomBean")
139138
public static class KustomAnnotationAutowiredBean {
140139

141140
@Autowired

0 commit comments

Comments
 (0)