|
90 | 90 | import org.springframework.integration.config.GlobalChannelInterceptor;
|
91 | 91 | import org.springframework.integration.config.IntegrationConverter;
|
92 | 92 | import org.springframework.integration.config.SpelFunctionFactoryBean;
|
| 93 | +import org.springframework.integration.context.IntegrationContextUtils; |
93 | 94 | import org.springframework.integration.core.MessageSource;
|
94 | 95 | import org.springframework.integration.core.MessagingTemplate;
|
95 | 96 | import org.springframework.integration.endpoint.AbstractEndpoint;
|
@@ -471,23 +472,31 @@ public void testMessagingGateway() throws InterruptedException {
|
471 | 472 | }
|
472 | 473 |
|
473 | 474 | /**
|
474 |
| - * Just creates an interim context to confirm that the DefaultConfiguringBeanFactoryPostProcessor |
475 |
| - * does not fail when there is an extra application context in the hierarchy. |
| 475 | + * Just creates an interim context to confirm that the |
| 476 | + * DefaultConfiguringBeanFactoryPostProcessor does not fail when there is an extra |
| 477 | + * application context in the hierarchy. |
476 | 478 | */
|
477 | 479 | @Test
|
478 | 480 | public void testDoubleParentChildAnnotationConfiguration() {
|
| 481 | + |
| 482 | + assertThat(this.context.containsBeanDefinition(IntegrationContextUtils.NULL_CHANNEL_BEAN_NAME)).isTrue(); |
| 483 | + |
479 | 484 | AnnotationConfigApplicationContext parent;
|
480 | 485 | parent = new AnnotationConfigApplicationContext();
|
481 | 486 | parent.register(ChildConfiguration.class);
|
482 | 487 | parent.setParent(this.context);
|
483 | 488 | parent.refresh();
|
484 | 489 |
|
| 490 | + assertThat(parent.containsBeanDefinition(IntegrationContextUtils.NULL_CHANNEL_BEAN_NAME)).isFalse(); |
| 491 | + |
485 | 492 | AnnotationConfigApplicationContext child;
|
486 | 493 | child = new AnnotationConfigApplicationContext();
|
487 | 494 | child.register(ChildConfiguration.class);
|
488 | 495 | child.setParent(parent);
|
489 | 496 | child.refresh();
|
490 | 497 |
|
| 498 | + assertThat(child.containsBeanDefinition(IntegrationContextUtils.NULL_CHANNEL_BEAN_NAME)).isFalse(); |
| 499 | + |
491 | 500 | parent.close();
|
492 | 501 | child.close();
|
493 | 502 | }
|
|
0 commit comments