Fix receiveOnlyAdviceChain condition

https://build.spring.io/browse/INT-MASTER-415/

The `Stream` `Collectors.toList()` returns empty list if nothing pass the `.filter()`, therefore condition as `if (receiveOnlyAdviceChain != null)` is not enough
and since `SourcePollingChannelAdapter.applyReceiveOnlyAdviceChain()` doesn't have conditions as well, the target `MessageSource` is proxyed for nothing.
When `TransactionSynchronizationManager.getResource(this)` is called for the `MessageSource` it can't find it because the proxy doesn't match an original object.

* Make condition as `if (!CollectionUtils.isEmpty(receiveOnlyAdviceChain))` in the `AbstractPollingEndpoint` and `SourcePollingChannelAdapter`
* Increase group removal wait timeout in the `gemfire.DelayerHandlerRescheduleIntegrationTests`
This commit is contained in:
Artem Bilan
2016-11-07 10:02:39 -05:00
parent 5cca8e8e01
commit 2aadf5ee3d
3 changed files with 18 additions and 15 deletions

View File

@@ -140,7 +140,7 @@ public class DelayerHandlerRescheduleIntegrationTests {
assertEquals(1, messageStore.getMessageGroupCount());
int n = 0;
while (n++ < 200 && messageStore.messageGroupSize(delayerMessageGroupId) > 0) {
Thread.sleep(50);
Thread.sleep(100);
}
assertEquals(0, messageStore.messageGroupSize(delayerMessageGroupId));