Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
Contribution was not applied on the actual use case

See gh-28915
  • Loading branch information
snicoll committed Aug 4, 2022
1 parent 34266f2 commit e5f9574
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -94,13 +94,13 @@ void applyToWhenHasImportAwareConfigurationRegistersBeanPostProcessorWithMapEntr
@Test
void applyToWhenHasImportAwareConfigurationRegistersBeanPostProcessorAfterApplicationContextAwareProcessor() {
BeanFactoryInitializationAotContribution contribution = getContribution(
ImportConfiguration.class);
TestAwareCallbackConfiguration.class);
contribution.applyTo(this.generationContext, this.beanFactoryInitializationCode);
compile((initializer, compiled) -> {
GenericApplicationContext freshContext = new AnnotationConfigApplicationContext();
GenericApplicationContext freshContext = new GenericApplicationContext();
DefaultListableBeanFactory freshBeanFactory = freshContext.getDefaultListableBeanFactory();
initializer.accept(freshBeanFactory);
freshContext.registerBean(TestAwareCallbackConfiguration.class);
freshContext.registerBean(TestAwareCallbackBean.class);
freshContext.refresh();
TestAwareCallbackBean bean = freshContext.getBean(TestAwareCallbackBean.class);
assertThat(bean.instances).hasSize(2);
Expand Down

0 comments on commit e5f9574

Please sign in to comment.