INT-1463 Fix PriorityChannel#getRemainingCapacity

JIRA: https://jira.spring.io/browse/INT-1463

An existing `QueueChannel#getRemainingCapacity()` is based on the `BlockingQueue#getRemainingCapacity()` which is always `Integer.MAX_VALUE`
and doesn't reflect reality for provided `capacity`

* Fix `PriorityChannel` to return `upperBound.availablePermits()` for `getRemainingCapacity()`
* Add test for `PriorityChannel` on the matter
* Also increase `reply-timeout` for `<int-redis:queue-outbound-gateway>` in `RedisQueueGatewayIntegrationTests-context.xml` from 1 sec to 10 secs
This commit is contained in:
Artem Bilan
2016-07-01 11:11:09 -04:00
parent 0187e49f70
commit cfa00c5707
4 changed files with 22 additions and 10 deletions

View File

@@ -26,7 +26,7 @@
<int-redis:queue-outbound-gateway id="outboundGateway"
request-channel="sendChannel"
queue="#{redisQueue.toString()}"
reply-timeout="1000"
reply-timeout="10000"
requires-reply="true"
reply-channel="outputChannel"/>