Author: cmueller Date: Tue Jan 3 23:32:38 2012 New Revision: 1226993 URL: http://svn.apache.org/viewvc?rev=1226993&view=rev Log: improve unit test
Modified: camel/branches/camel-2.7.x/camel-core/src/test/java/org/apache/camel/processor/ThrottlingInflightRoutePolicyContextScopeTest.java Modified: camel/branches/camel-2.7.x/camel-core/src/test/java/org/apache/camel/processor/ThrottlingInflightRoutePolicyContextScopeTest.java URL: http://svn.apache.org/viewvc/camel/branches/camel-2.7.x/camel-core/src/test/java/org/apache/camel/processor/ThrottlingInflightRoutePolicyContextScopeTest.java?rev=1226993&r1=1226992&r2=1226993&view=diff ============================================================================== --- camel/branches/camel-2.7.x/camel-core/src/test/java/org/apache/camel/processor/ThrottlingInflightRoutePolicyContextScopeTest.java (original) +++ camel/branches/camel-2.7.x/camel-core/src/test/java/org/apache/camel/processor/ThrottlingInflightRoutePolicyContextScopeTest.java Tue Jan 3 23:32:38 2012 @@ -17,6 +17,7 @@ package org.apache.camel.processor; import java.util.concurrent.CountDownLatch; +import java.util.concurrent.TimeUnit; import org.apache.camel.ContextTestSupport; import org.apache.camel.Exchange; @@ -48,7 +49,7 @@ public class ThrottlingInflightRoutePoli Thread.sleep(2000); template.sendBody("direct:start", "B"); - result.assertIsSatisfied(); + MockEndpoint.assertIsSatisfied(2, TimeUnit.SECONDS, result); result.reset(); result.expectedBodiesReceived("B"); @@ -57,7 +58,7 @@ public class ThrottlingInflightRoutePoli // to the throttler to resume the seda:foo consumer, so B can get done latch.countDown(); - result.assertIsSatisfied(); + MockEndpoint.assertIsSatisfied(2, TimeUnit.SECONDS, result); } @Override