Author: davsclaus
Date: Fri Aug 19 17:05:22 2011
New Revision: 1159683
URL: http://svn.apache.org/viewvc?rev=1159683&view=rev
Log:
CAMEL-4354: Fixed issue with ExchangeSentEvent being emitted to soon when using
async routing engine.
Modified:
camel/trunk/camel-core/src/test/java/org/apache/camel/processor/async/AsyncEndpointEventNotifierTest.java
Modified:
camel/trunk/camel-core/src/test/java/org/apache/camel/processor/async/AsyncEndpointEventNotifierTest.java
URL:
http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/async/AsyncEndpointEventNotifierTest.java?rev=1159683&r1=1159682&r2=1159683&view=diff
==============================================================================
---
camel/trunk/camel-core/src/test/java/org/apache/camel/processor/async/AsyncEndpointEventNotifierTest.java
(original)
+++
camel/trunk/camel-core/src/test/java/org/apache/camel/processor/async/AsyncEndpointEventNotifierTest.java
Fri Aug 19 17:05:22 2011
@@ -36,7 +36,7 @@ public class AsyncEndpointEventNotifierT
private final CountDownLatch latch = new CountDownLatch(1);
private final AtomicLong time = new AtomicLong();
- public void testAsyncEndpointEventNotifer() throws Exception {
+ public void testAsyncEndpointEventNotifier() throws Exception {
getMockEndpoint("mock:before").expectedBodiesReceived("Hello Camel");
getMockEndpoint("mock:result").expectedBodiesReceived("Bye Camel");
@@ -48,7 +48,8 @@ public class AsyncEndpointEventNotifierT
assertTrue("Should count down", latch.await(10, TimeUnit.SECONDS));
long delta = time.get();
- assertTrue("Should take about 1000 millis sec, was: " + delta, delta >
800);
+ log.info("ExchangeEventSent took ms: " + delta);
+ assertTrue("Should take about 250 millis sec, was: " + delta, delta >
200);
}
@Override
@@ -93,7 +94,7 @@ public class AsyncEndpointEventNotifierT
from("direct:start")
.to("mock:before")
- .to("async:Bye Camel?delay=1000")
+ .to("async:Bye Camel?delay=250")
.to("mock:result");
}
};