INT-1890 added error-channel to HTTP Inboudn gateway/adapter
This commit is contained in:
@@ -16,7 +16,7 @@
|
||||
<si:queue capacity="1"/>
|
||||
</si:channel>
|
||||
|
||||
<inbound-channel-adapter id="defaultAdapter" channel="requests"/>
|
||||
<inbound-channel-adapter id="defaultAdapter" channel="requests" error-channel="errorChannel"/>
|
||||
|
||||
<inbound-channel-adapter id="postOnlyAdapter" channel="requests" supported-methods="POST"/>
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2010 the original author or authors.
|
||||
* Copyright 2002-2011 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -95,6 +95,7 @@ public class HttpInboundChannelAdapterParserTests {
|
||||
assertEquals("foo", map.keySet().iterator().next());
|
||||
assertEquals(1, map.get("foo").size());
|
||||
assertEquals("bar", map.getFirst("foo"));
|
||||
assertNotNull(TestUtils.getPropertyValue(defaultAdapter, "errorChannel"));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
<si:queue/>
|
||||
</si:channel>
|
||||
|
||||
<inbound-gateway id="inboundGateway" request-channel="requests" reply-channel="responses" convert-exceptions="true"/>
|
||||
<inbound-gateway id="inboundGateway" request-channel="requests" reply-channel="responses" convert-exceptions="true" error-channel="errorChannel"/>
|
||||
|
||||
<inbound-gateway id="inboundController" request-channel="requests" reply-channel="responses" view-name="foo" error-code="oops"/>
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2010 the original author or authors.
|
||||
* Copyright 2002-2011 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -89,6 +89,7 @@ public class HttpInboundGatewayParserTests {
|
||||
assertThat((Boolean) getPropertyValue(gateway, "expectReply"), is(true));
|
||||
assertThat((Boolean) getPropertyValue(gateway, "convertExceptions"), is(true));
|
||||
assertThat((PollableChannel) getPropertyValue(gateway, "replyChannel"), is(responses));
|
||||
assertNotNull(TestUtils.getPropertyValue(gateway, "errorChannel"));
|
||||
}
|
||||
|
||||
@Test(timeout=1000)
|
||||
|
||||
Reference in New Issue
Block a user