Repository: camel Updated Branches: refs/heads/master 0c7a14be5 -> cc0185bf7
Improvements to PollEnricher with Custom Aggregation Strategy test Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/cc0185bf Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/cc0185bf Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/cc0185bf Branch: refs/heads/master Commit: cc0185bf7060f0139077dfbab2ad13d6ffa3957d Parents: 0c7a14b Author: Andrea Cosentino <anco...@gmail.com> Authored: Sat Mar 5 10:03:44 2016 +0100 Committer: Andrea Cosentino <anco...@gmail.com> Committed: Sat Mar 5 10:06:07 2016 +0100 ---------------------------------------------------------------------- .../enricher/PollEnrichFileCustomAggregationStrategyTest.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/camel/blob/cc0185bf/camel-core/src/test/java/org/apache/camel/processor/enricher/PollEnrichFileCustomAggregationStrategyTest.java ---------------------------------------------------------------------- diff --git a/camel-core/src/test/java/org/apache/camel/processor/enricher/PollEnrichFileCustomAggregationStrategyTest.java b/camel-core/src/test/java/org/apache/camel/processor/enricher/PollEnrichFileCustomAggregationStrategyTest.java index 3a8bfd4..5b68004 100644 --- a/camel-core/src/test/java/org/apache/camel/processor/enricher/PollEnrichFileCustomAggregationStrategyTest.java +++ b/camel-core/src/test/java/org/apache/camel/processor/enricher/PollEnrichFileCustomAggregationStrategyTest.java @@ -35,7 +35,7 @@ public class PollEnrichFileCustomAggregationStrategyTest extends ContextTestSupp } @Test - public void testPollEnrichDefaultAggregationStrategyBody() throws Exception { + public void testPollEnrichCustomAggregationStrategyBody() throws Exception { getMockEndpoint("mock:start").expectedBodiesReceived("Start"); @@ -53,8 +53,7 @@ public class PollEnrichFileCustomAggregationStrategyTest extends ContextTestSupp assertMockEndpointsSatisfied(); - // With Custom Aggregation Strategy The readLock continues to exist even if it should be deleted - // assertFileDoesNotExists("target/enrichdata/AAA.dat.camelLock"); + assertFileDoesNotExists("target/enrichdata/AAA.dat.camelLock"); } @Override @@ -81,8 +80,10 @@ public class PollEnrichFileCustomAggregationStrategyTest extends ContextTestSupp Object resourceResponse = resource.getIn().getBody(); if (original.getPattern().isOutCapable()) { original.getOut().setBody(resourceResponse); + original.getProperties().putAll(resource.getProperties()); } else { original.getIn().setBody(resourceResponse); + original.getProperties().putAll(resource.getProperties()); } return original; }