Author: janstey
Date: Thu Dec 18 10:40:51 2008
New Revision: 727786
URL: http://svn.apache.org/viewvc?rev=727786&view=rev
Log:
Fix timing issue in aggregator test
Modified:
activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/aggregator/AggregatorBatchOptionsTest.java
Modified:
activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/aggregator/AggregatorBatchOptionsTest.java
URL:
http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/aggregator/AggregatorBatchOptionsTest.java?rev=727786&r1=727785&r2=727786&view=diff
==============================================================================
---
activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/aggregator/AggregatorBatchOptionsTest.java
(original)
+++
activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/aggregator/AggregatorBatchOptionsTest.java
Thu Dec 18 10:40:51 2008
@@ -16,6 +16,8 @@
*/
package org.apache.camel.processor.aggregator;
+import java.util.concurrent.TimeUnit;
+
import org.apache.camel.ContextTestSupport;
import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.component.mock.MockEndpoint;
@@ -111,6 +113,9 @@
template.sendBodyAndHeader("direct:start", "Message 1b", "id", "1");
template.sendBodyAndHeader("direct:start", "Message 2b", "id", "2");
template.sendBodyAndHeader("direct:start", "Message 1c", "id", "1");
+
+ result.await(500L, TimeUnit.MILLISECONDS);
+
// when we sent the next message we have reached the in batch size
limit and the current
// aggregated exchanges will be sent
// wait a while for aggregating in a slower box