You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2016/06/10 06:48:42 UTC

[2/3] camel git commit: Modified AggregateGroupedExchangeTest replacing deprecated groupExchanges() method.

Modified AggregateGroupedExchangeTest replacing deprecated
groupExchanges() method.

Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/f81f9da4
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/f81f9da4
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/f81f9da4

Branch: refs/heads/master
Commit: f81f9da47131a266cc4a16df51090c565bfa9cdc
Parents: fd57cfc
Author: 1984shekhar <sh...@yahoo.co.in>
Authored: Thu Jun 9 18:02:57 2016 +0530
Committer: Claus Ibsen <da...@apache.org>
Committed: Fri Jun 10 08:40:51 2016 +0200

----------------------------------------------------------------------
 .../processor/aggregator/AggregateGroupedExchangeTest.java    | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/f81f9da4/camel-core/src/test/java/org/apache/camel/processor/aggregator/AggregateGroupedExchangeTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/processor/aggregator/AggregateGroupedExchangeTest.java b/camel-core/src/test/java/org/apache/camel/processor/aggregator/AggregateGroupedExchangeTest.java
index 4628462..b055197 100644
--- a/camel-core/src/test/java/org/apache/camel/processor/aggregator/AggregateGroupedExchangeTest.java
+++ b/camel-core/src/test/java/org/apache/camel/processor/aggregator/AggregateGroupedExchangeTest.java
@@ -22,6 +22,7 @@ import org.apache.camel.ContextTestSupport;
 import org.apache.camel.Exchange;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.mock.MockEndpoint;
+import org.apache.camel.processor.aggregate.GroupedExchangeAggregationStrategy;
 
 /**
  * Unit test for aggregate grouped exchanges.
@@ -65,12 +66,10 @@ public class AggregateGroupedExchangeTest extends ContextTestSupport {
                 // START SNIPPET: e1
                 // our route is aggregating from the direct queue and sending the response to the mock
                 from("direct:start")
-                    // aggregate all using same expression
-                    .aggregate(constant(true))
+                    // aggregate all using same expression and group the exchanges so we get one single exchange containing all the others
+                    .aggregate(new GroupedExchangeAggregationStrategy()).constant(true)
                     // wait for 0.5 seconds to aggregate
                     .completionTimeout(500L)
-                    // group the exchanges so we get one single exchange containing all the others
-                    .groupExchanges()
                     .to("mock:result");
                 // END SNIPPET: e1
             }