You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Claus Straube <cl...@catify.com> on 2010/11/23 13:53:30 UTC
result wait time does not work
Hi all,
I'm testing with CamelTestSupport and have a long running test:
int runs = 1500;
MockEndpoint out = getMockEndpoint("mock:out2");
...
out.expectedMessageCount(runs);
out.setResultWaitTime(60000);
System.out.println("---> " + out.getResultWaitTime());
out.assertIsSatisfied();
To avoid that I'm running in a time out, I've set the result wait time
to one minute. But the timeout comes after 10 seconds (see log below).
What I'm doing wrong?
Best regards - Claus
INFO: Total 2 routes, of which 2 is started.
23.11.2010 13:48:42 org.apache.camel.impl.DefaultCamelContext start
INFO: Apache Camel 2.5.0 (CamelContext: camel-1) started in 0.410 seconds
---> 60000
23.11.2010 13:48:42 org.apache.camel.component.mock.MockEndpoint
assertIsSatisfied
INFO: Asserting: Endpoint[mock://out2] is satisfied
23.11.2010 13:48:53 org.apache.camel.test.CamelTestSupport tearDown
INFO: Testing done:
testHighLoad(org.apache.camel.processor.idempotent.test.TestIdempotentRepositoryInRoute)
23.11.2010 13:48:53 org.apache.camel.impl.DefaultCamelContext doStop
INFO: Apache Camel 2.5.0 (CamelContext:camel-1) is shutting down
23.11.2010 13:48:53 org.apache.camel.impl.DefaultShutdownStrategy doShutdown
INFO: Starting to graceful shutdown 2 routes (timeout 10 seconds)
23.11.2010 13:48:53
org.apache.camel.impl.DefaultShutdownStrategy$ShutdownTask run
INFO: Route: mongodb_idempotent_repository_md5 suspension deferred.
23.11.2010 13:48:53
org.apache.camel.impl.DefaultShutdownStrategy$ShutdownTask run
INFO: Route: mongodb_idempotent_repository suspension deferred.
23.11.2010 13:48:53
org.apache.camel.impl.DefaultShutdownStrategy$ShutdownTask run
INFO: Waiting as there are still 5926 inflight and pending exchanges to
complete, timeout in 10 seconds.
Re: result wait time does not work
Posted by Claus Straube <cl...@catify.com>.
Hi Claus,
I think this was an IDE issue. After cleaning the project both
alternatives are working. Sorry.
Best regards - Claus
On 23.11.2010 16:57, Claus Ibsen wrote:
> Hi
>
> You may have found an issue there.
>
> Try using this instead
> out.assertIsSatisfied(60, TimeUnit.SECONDS);
>
>
>
> On Tue, Nov 23, 2010 at 1:53 PM, Claus Straube<cl...@catify.com> wrote:
>> Hi all,
>>
>> I'm testing with CamelTestSupport and have a long running test:
>>
>> int runs = 1500;
>>
>> MockEndpoint out = getMockEndpoint("mock:out2");
>>
>> ...
>>
>> out.expectedMessageCount(runs);
>> out.setResultWaitTime(60000);
>> System.out.println("---> " + out.getResultWaitTime());
>>
>> out.assertIsSatisfied();
>>
>> To avoid that I'm running in a time out, I've set the result wait time to
>> one minute. But the timeout comes after 10 seconds (see log below). What I'm
>> doing wrong?
>>
>> Best regards - Claus
>>
>>
>> INFO: Total 2 routes, of which 2 is started.
>> 23.11.2010 13:48:42 org.apache.camel.impl.DefaultCamelContext start
>> INFO: Apache Camel 2.5.0 (CamelContext: camel-1) started in 0.410 seconds
>> ---> 60000
>> 23.11.2010 13:48:42 org.apache.camel.component.mock.MockEndpoint
>> assertIsSatisfied
>> INFO: Asserting: Endpoint[mock://out2] is satisfied
>> 23.11.2010 13:48:53 org.apache.camel.test.CamelTestSupport tearDown
>> INFO: Testing done:
>> testHighLoad(org.apache.camel.processor.idempotent.test.TestIdempotentRepositoryInRoute)
>> 23.11.2010 13:48:53 org.apache.camel.impl.DefaultCamelContext doStop
>> INFO: Apache Camel 2.5.0 (CamelContext:camel-1) is shutting down
>> 23.11.2010 13:48:53 org.apache.camel.impl.DefaultShutdownStrategy doShutdown
>> INFO: Starting to graceful shutdown 2 routes (timeout 10 seconds)
>> 23.11.2010 13:48:53
>> org.apache.camel.impl.DefaultShutdownStrategy$ShutdownTask run
>> INFO: Route: mongodb_idempotent_repository_md5 suspension deferred.
>> 23.11.2010 13:48:53
>> org.apache.camel.impl.DefaultShutdownStrategy$ShutdownTask run
>> INFO: Route: mongodb_idempotent_repository suspension deferred.
>> 23.11.2010 13:48:53
>> org.apache.camel.impl.DefaultShutdownStrategy$ShutdownTask run
>> INFO: Waiting as there are still 5926 inflight and pending exchanges to
>> complete, timeout in 10 seconds.
>>
>
>
--
claus straube
__________________________________________
phone +49-89-38157419
mobile +49-176-49673717
web http://www.catify.com
office 6. floor, heßstr. 56, 80798 munich
__________________________________________
catify | claus straube, sebastian münz
Re: result wait time does not work
Posted by Claus Ibsen <cl...@gmail.com>.
Hi
You may have found an issue there.
Try using this instead
out.assertIsSatisfied(60, TimeUnit.SECONDS);
On Tue, Nov 23, 2010 at 1:53 PM, Claus Straube <cl...@catify.com> wrote:
> Hi all,
>
> I'm testing with CamelTestSupport and have a long running test:
>
> int runs = 1500;
>
> MockEndpoint out = getMockEndpoint("mock:out2");
>
> ...
>
> out.expectedMessageCount(runs);
> out.setResultWaitTime(60000);
> System.out.println("---> " + out.getResultWaitTime());
>
> out.assertIsSatisfied();
>
> To avoid that I'm running in a time out, I've set the result wait time to
> one minute. But the timeout comes after 10 seconds (see log below). What I'm
> doing wrong?
>
> Best regards - Claus
>
>
> INFO: Total 2 routes, of which 2 is started.
> 23.11.2010 13:48:42 org.apache.camel.impl.DefaultCamelContext start
> INFO: Apache Camel 2.5.0 (CamelContext: camel-1) started in 0.410 seconds
> ---> 60000
> 23.11.2010 13:48:42 org.apache.camel.component.mock.MockEndpoint
> assertIsSatisfied
> INFO: Asserting: Endpoint[mock://out2] is satisfied
> 23.11.2010 13:48:53 org.apache.camel.test.CamelTestSupport tearDown
> INFO: Testing done:
> testHighLoad(org.apache.camel.processor.idempotent.test.TestIdempotentRepositoryInRoute)
> 23.11.2010 13:48:53 org.apache.camel.impl.DefaultCamelContext doStop
> INFO: Apache Camel 2.5.0 (CamelContext:camel-1) is shutting down
> 23.11.2010 13:48:53 org.apache.camel.impl.DefaultShutdownStrategy doShutdown
> INFO: Starting to graceful shutdown 2 routes (timeout 10 seconds)
> 23.11.2010 13:48:53
> org.apache.camel.impl.DefaultShutdownStrategy$ShutdownTask run
> INFO: Route: mongodb_idempotent_repository_md5 suspension deferred.
> 23.11.2010 13:48:53
> org.apache.camel.impl.DefaultShutdownStrategy$ShutdownTask run
> INFO: Route: mongodb_idempotent_repository suspension deferred.
> 23.11.2010 13:48:53
> org.apache.camel.impl.DefaultShutdownStrategy$ShutdownTask run
> INFO: Waiting as there are still 5926 inflight and pending exchanges to
> complete, timeout in 10 seconds.
>
--
Claus Ibsen
-----------------
FuseSource
Email: cibsen@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/