Renamed 'invalidMessageChannel' to 'errorChannel'
This commit is contained in:
@@ -159,7 +159,7 @@ public class MessageBusTests {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testInvalidMessageChannelWithFailedDispatch() throws InterruptedException {
|
||||
public void testErrorChannelWithFailedDispatch() throws InterruptedException {
|
||||
MessageBus bus = new MessageBus();
|
||||
CountDownLatch latch = new CountDownLatch(1);
|
||||
SourceAdapter sourceAdapter = new PollingSourceAdapter<Object>(new FailingSource(latch));
|
||||
@@ -167,7 +167,7 @@ public class MessageBusTests {
|
||||
bus.registerSourceAdapter("testAdapter", sourceAdapter);
|
||||
bus.start();
|
||||
latch.await(1000, TimeUnit.MILLISECONDS);
|
||||
Message<?> message = bus.getInvalidMessageChannel().receive(100);
|
||||
Message<?> message = bus.getErrorChannel().receive(100);
|
||||
assertNotNull("message should not be null", message);
|
||||
assertTrue(message instanceof ErrorMessage);
|
||||
assertEquals("intentional test failure", ((ErrorMessage) message).getPayload().getMessage());
|
||||
|
||||
@@ -39,7 +39,7 @@ public class MessageBusParserTests {
|
||||
"messageBusWithErrorChannelReference.xml", this.getClass());
|
||||
MessageBus bus = (MessageBus) context.getBean(MessageBusParser.MESSAGE_BUS_BEAN_NAME);
|
||||
bus.initialize();
|
||||
assertEquals(context.getBean("errorMessages"), bus.getInvalidMessageChannel());
|
||||
assertEquals(context.getBean("testErrorChannel"), bus.getErrorChannel());
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -48,7 +48,7 @@ public class MessageBusParserTests {
|
||||
"messageBusWithDefaults.xml", this.getClass());
|
||||
MessageBus bus = (MessageBus) context.getBean(MessageBusParser.MESSAGE_BUS_BEAN_NAME);
|
||||
bus.initialize();
|
||||
assertNotNull("bus should have created a default error channel", bus.getInvalidMessageChannel());
|
||||
assertNotNull("bus should have created a default error channel", bus.getErrorChannel());
|
||||
}
|
||||
|
||||
@Test(expected=MessagingConfigurationException.class)
|
||||
|
||||
@@ -7,8 +7,8 @@
|
||||
http://www.springframework.org/schema/integration
|
||||
http://www.springframework.org/schema/integration/spring-integration-1.0.xsd">
|
||||
|
||||
<channel id="errorMessages"/>
|
||||
<channel id="testErrorChannel"/>
|
||||
|
||||
<message-bus invalid-message-channel="errorMessages"/>
|
||||
<message-bus error-channel="testErrorChannel"/>
|
||||
|
||||
</beans:beans>
|
||||
|
||||
Reference in New Issue
Block a user