You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ha...@apache.org on 2008/01/17 07:06:57 UTC
svn commit: r612723 - in /activemq/camel/trunk/camel-core: pom.xml
src/main/java/org/apache/camel/model/AggregatorType.java
src/test/java/org/apache/camel/processor/aggregator/AlbertoAggregatorTest.java
Author: hadrian
Date: Wed Jan 16 22:06:50 2008
New Revision: 612723
URL: http://svn.apache.org/viewvc?rev=612723&view=rev
Log:
camel-223
Modified:
activemq/camel/trunk/camel-core/pom.xml
activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/AggregatorType.java
activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/aggregator/AlbertoAggregatorTest.java
Modified: activemq/camel/trunk/camel-core/pom.xml
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/pom.xml?rev=612723&r1=612722&r2=612723&view=diff
==============================================================================
--- activemq/camel/trunk/camel-core/pom.xml (original)
+++ activemq/camel/trunk/camel-core/pom.xml Wed Jan 16 22:06:50 2008
@@ -132,10 +132,6 @@
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<forkMode>pertest</forkMode>
- <excludes>
- <!-- TODO fix ASAP! -->
- <exclude>**/AlbertoAggregatorTest.*</exclude>
- </excludes>
</configuration>
</plugin>
Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/AggregatorType.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/AggregatorType.java?rev=612723&r1=612722&r2=612723&view=diff
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/AggregatorType.java (original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/AggregatorType.java Wed Jan 16 22:06:50 2008
@@ -76,7 +76,8 @@
return "Aggregator[ " + getExpression() + " -> " + getOutputs() + "]";
}
- @Override
+ @SuppressWarnings("unchecked")
+ @Override
public void addRoutes(RouteContext routeContext, Collection<Route> routes) throws Exception {
Endpoint from = routeContext.getEndpoint();
final Processor processor = routeContext.createProcessor(this);
@@ -105,7 +106,7 @@
if (batchSize != null) {
service.setBatchSize(batchSize);
}
- if (batchSize != null) {
+ if (batchTimeout != null) {
service.setBatchTimeout(batchTimeout);
}
Modified: activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/aggregator/AlbertoAggregatorTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/aggregator/AlbertoAggregatorTest.java?rev=612723&r1=612722&r2=612723&view=diff
==============================================================================
--- activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/aggregator/AlbertoAggregatorTest.java (original)
+++ activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/aggregator/AlbertoAggregatorTest.java Wed Jan 16 22:06:50 2008
@@ -181,10 +181,6 @@
.to("direct:joinSurnames");
- // FIXME: This aggregator doesn«t usually fail but could also due to timeout
- // or an incorrect batch size
- // Join in a list by the surname on the header and mark as
- // brothers list
from("direct:joinSurnames")
.aggregator(header(SURNAME_HEADER),
surnameAggregator).setHeader(TYPE_HEADER,
@@ -195,13 +191,6 @@
from("direct:joinBrothers").aggregator(header(TYPE_HEADER),
brothersAggregator);
- // FIXME: If these lines get commented the test fails some times with different errors
- // due to a timeout or incorrect batch size that must be adjusted by hand
- // There are two brothers lists to join but we don«t know always the number "a priori"
-/*
- agg.setBatchSize(2);
- agg.setBatchTimeout(10000L);
-*/
agg.setBatchTimeout(5000L);
agg.removeHeader(SURNAME_HEADER)
.removeHeader(TYPE_HEADER)