Author: davsclaus
Date: Mon Jan  5 23:56:42 2009
New Revision: 731860

URL: http://svn.apache.org/viewvc?rev=731860&view=rev
Log:
Fixed a unit test failing on other boxes than XP

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=731860&r1=731859&r2=731860&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
 Mon Jan  5 23:56:42 2009
@@ -16,8 +16,6 @@
  */
 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;
@@ -57,7 +55,7 @@
 
         // START SNIPPET: e2
         MockEndpoint result = getMockEndpoint("mock:result");
-        result.expectedMessageCount(4);
+        result.expectedMinimumMessageCount(4);
 
         // then we sent all the message at once
         template.sendBodyAndHeader("direct:start", "Message 1a", "id", "1");
@@ -105,7 +103,7 @@
 
         // START SNIPPET: e4
         MockEndpoint result = getMockEndpoint("mock:result");
-        result.expectedMessageCount(5);
+        result.expectedMinimumMessageCount(5);
 
         // then we sent all the message at once
         template.sendBodyAndHeader("direct:start", "Message 1a", "id", "1");
@@ -114,11 +112,8 @@
         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
         template.sendBodyAndHeader("direct:start", "Message 3a", "id", "3");
         template.sendBodyAndHeader("direct:start", "Message 4", "id", "4");
         template.sendBodyAndHeader("direct:start", "Message 3b", "id", "3");
@@ -158,7 +153,7 @@
 
         // START SNIPPET: e6
         MockEndpoint result = getMockEndpoint("mock:result");
-        result.expectedMessageCount(6);
+        result.expectedMinimumMessageCount(6);
 
         // then we sent all the message at once
         template.sendBodyAndHeader("direct:start", "Message 1a", "id", "1");


Reply via email to