Renamed 'invalidMessageChannel' to 'errorChannel'

This commit is contained in:
Mark Fisher
2008-01-16 16:38:14 +00:00
parent 22386aabb7
commit 2ffae06824
8 changed files with 26 additions and 26 deletions

View File

@@ -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());

View File

@@ -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)

View File

@@ -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>