Fixed side effect on other tests

Issue: SPR-10459
master
Juergen Hoeller 10 years ago
parent c1d149591a
commit 47006eeff1
  1. 4
      spring-context/src/test/java/org/springframework/context/annotation/ComponentScanAnnotationIntegrationTests.java
  2. 1
      spring-context/src/test/java/org/springframework/context/annotation/ComponentScanParserTests.java

@ -159,8 +159,8 @@ public class ComponentScanAnnotationIntegrationTests {
@Test
public void withCustomTypeFilter() {
AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext(ComponentScanWithCustomTypeFilter.class);
assertFalse(ctx.getDefaultListableBeanFactory().containsSingleton("kustomBean"));
KustomAnnotationAutowiredBean testBean = ctx.getBean("kustomBean", KustomAnnotationAutowiredBean.class);
assertFalse(ctx.getDefaultListableBeanFactory().containsSingleton("componentScanParserTests.KustomAnnotationAutowiredBean"));
KustomAnnotationAutowiredBean testBean = ctx.getBean("componentScanParserTests.KustomAnnotationAutowiredBean", KustomAnnotationAutowiredBean.class);
assertThat(testBean.getDependency(), notNullValue());
}

@ -135,7 +135,6 @@ public class ComponentScanParserTests {
* Intentionally spelling "custom" with a "k" since there are numerous
* classes in this package named *Custom*.
*/
@Component("kustomBean")
public static class KustomAnnotationAutowiredBean {
@Autowired

Loading…
Cancel
Save